WordPress.org

Make WordPress Core

Ticket #12560: get_blog_option_unserialize_patch.2.diff

File get_blog_option_unserialize_patch.2.diff, 556 bytes (added by OpenHaus, 4 years ago)

Check for an array and skip stripslash part

  • wp-includes/ms-blogs.php

     
    315315        if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting ) 
    316316                $value = untrailingslashit( $value ); 
    317317 
    318         if (! @unserialize( $value ) ) 
     318        if (! @unserialize( $value ) && !is_array( $value ) ) 
    319319                $value = stripslashes( $value ); 
    320320 
    321321        return apply_filters( 'blog_option_' . $setting, maybe_unserialize( $value ), $blog_id );