Make WordPress Core

Ticket #35928: 35928.patch

File 35928.patch, 677 bytes (added by dlh, 9 years ago)
  • src/wp-includes/widgets.php

     
    830830        global $wp_registered_widgets, $wp_registered_sidebars;
    831831        $sidebars_widgets = get_option('sidebars_widgets');
    832832        foreach ( (array) $wp_registered_sidebars as $index => $sidebar ) {
    833                 if ( count($sidebars_widgets[$index]) ) {
     833                if ( isset( $sidebars_widgets[ $index ] ) && count( $sidebars_widgets[ $index ] ) ) {
    834834                        foreach ( (array) $sidebars_widgets[$index] as $widget )
    835835                                if ( array_key_exists($widget, $wp_registered_widgets) )
    836836                                        return true;