Fix notice. Props ionfish. fixes #9018
git-svn-id: http://svn.automattic.com/wordpress/trunk@10631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2238d7148b
commit
87d69b6268
|
@ -89,9 +89,12 @@ if ( $http_post && isset($sidebars_widgets[$_POST['sidebar']]) ) {
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
// Prophylactic. Take out empty ids.
|
// Prophylactic. Take out empty ids.
|
||||||
foreach ( (array) $_POST['widget-id'] as $key => $val )
|
if ( isset($_POST['widget-id']) ) {
|
||||||
if ( !$val )
|
foreach ( (array) $_POST['widget-id'] as $key => $val ) {
|
||||||
unset($_POST['widget-id'][$key]);
|
if ( !$val )
|
||||||
|
unset($_POST['widget-id'][$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Reset the key numbering and store
|
// Reset the key numbering and store
|
||||||
$new_sidebar = isset( $_POST['widget-id'] ) && is_array( $_POST['widget-id'] ) ? array_values( $_POST['widget-id'] ) : array();
|
$new_sidebar = isset( $_POST['widget-id'] ) && is_array( $_POST['widget-id'] ) ? array_values( $_POST['widget-id'] ) : array();
|
||||||
|
|
Loading…
Reference in New Issue