Make WordPress Core

Ticket #18598: 18598.patch

File 18598.patch, 971 bytes (added by SergeyBiryukov, 13 years ago)
  • wp-includes/widgets.php

     
    998998        if ( $deprecated !== true )
    999999                _deprecated_argument( __FUNCTION__, '2.8.1' );
    10001000
    1001         global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets;
     1001        global $wp_registered_widgets, $wp_registered_sidebars, $_wp_sidebars_widgets, $sidebars_widgets;
    10021002
    10031003        // If loading from front page, consult $_wp_sidebars_widgets rather than options
    10041004        // to see if wp_convert_widget_settings() has made manipulations in memory.
     
    12331233                        return;
    12341234
    12351235                $_sidebars_widgets = array(
    1236                         'wp_inactive_widgets' => $sidebars_widgets['wp_inactive_widgets']
     1236                        'wp_inactive_widgets' => !empty( $sidebars_widgets['wp_inactive_widgets'] ) ? $sidebars_widgets['wp_inactive_widgets'] : array()
    12371237                );
    12381238
    12391239                unset( $sidebars_widgets['wp_inactive_widgets'] );