• There is a bug in ms-blogs.php of the new 3.01 version (line 338 or 308 depending on how you look at it)

    if (! @unserialize( $value ) )
             $value = stripslashes( $value );

    value at line 338 can be an array, if so stripslashing on that array is impossible (stripslashes requires a string as input not an array). I do not know what the plans were but this happens when an array is stored in cache (content of $value in line 308 being a plain array, not serialized), so it cannot be unserialized when it was an array and stripslashes is triggered on the array (because it could not be unserialized), and doing so you loose the array value, instead a string with the value of ‘Array’ is passed back from get_blog_option.

    We temporarily bypassed the issue by stripslashing only when $value is a string.

    if (! @unserialize( $value ) )
            if (is_string($value)) $value = stripslashes( $value );

    but maybe you want to serialize value on line 308 if it is not a string, as I said I’m not aware of what the plans where. Either way you test for type and do stuff.

    Peter

  • The topic ‘3.01 Bug in ms-blogs.php’ is closed to new replies.