Fix notices when an in-use widget is deleted. See #9393 props nbachiyski

git-svn-id: http://svn.automattic.com/wordpress/trunk@11229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-05-07 06:59:06 +00:00
parent 99c157dbaf
commit 792271cc4b

View File

@ -769,6 +769,9 @@ function dynamic_sidebar($index = 1) {
$did_one = false; $did_one = false;
foreach ( (array) $sidebars_widgets[$index] as $id ) { foreach ( (array) $sidebars_widgets[$index] as $id ) {
if ( !isset($wp_registered_widgets[$id]) ) continue;
$params = array_merge( $params = array_merge(
array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ), array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ),
(array) $wp_registered_widgets[$id]['params'] (array) $wp_registered_widgets[$id]['params']