From 792271cc4bd32e3eab591c13a38979d1aca504d9 Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 7 May 2009 06:59:06 +0000 Subject: [PATCH] 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 --- wp-includes/widgets.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 40d249e6a6..71ce5f2553 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -769,6 +769,9 @@ function dynamic_sidebar($index = 1) { $did_one = false; foreach ( (array) $sidebars_widgets[$index] as $id ) { + + if ( !isset($wp_registered_widgets[$id]) ) continue; + $params = array_merge( array( array_merge( $sidebar, array('widget_id' => $id, 'widget_name' => $wp_registered_widgets[$id]['name']) ) ), (array) $wp_registered_widgets[$id]['params']