Bail early in dynamic_sidebar() if there are no sidebars. fixes #14816.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-03-23 18:59:52 +00:00
parent adcc961d69
commit d9abef8ea3
1 changed files with 2 additions and 0 deletions

View File

@ -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;