valendesigns / option-tree

Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes.
GNU General Public License v2.0
597 stars 179 forks source link

_sanitize_recursive problem #702

Closed anteksiler closed 5 years ago

anteksiler commented 5 years ago

I am getting cannot redeclare on the code block below:

function _sanitize_recursive( $values = array() ) {
$result = array();
foreach ( $values as $key => $value ) {
    if ( ! is_object( $value ) ) {
        if ( is_scalar( $value ) ) {
            $result[ $key ] = sanitize_textarea_field( $value );
        } else {
            $result[ $key ] = _sanitize_recursive( $value );
        }
    }
}

Couldn't figure it out why.

victoras commented 5 years ago

I get the same issue, when using Typography!

@valendesigns any thoughts on this?

Thanks!

Ninetheme commented 5 years ago

same +1

is there any custom fix?

valendesigns commented 5 years ago

This was fixed in 2.7.1, thanks for reporting the issue.