diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 4c6d4f4489..60cfa2f3e9 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -854,6 +854,8 @@ function dynamic_sidebar($index = 1) { } $sidebars_widgets = wp_get_sidebars_widgets(); + if ( empty( $sidebars_widgets ) ) + return false; if ( empty($wp_registered_sidebars[$index]) || !array_key_exists($index, $sidebars_widgets) || !is_array($sidebars_widgets[$index]) || empty($sidebars_widgets[$index]) ) return false;