Fix notice. Props ionfish. fixes #9018
git-svn-id: https://develop.svn.wordpress.org/trunk@10631 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a6850c37ee
commit
b62d27d733
@ -89,9 +89,12 @@ if ( $http_post && isset($sidebars_widgets[$_POST['sidebar']]) ) {
|
||||
ob_end_clean();
|
||||
|
||||
// Prophylactic. Take out empty ids.
|
||||
foreach ( (array) $_POST['widget-id'] as $key => $val )
|
||||
if ( !$val )
|
||||
unset($_POST['widget-id'][$key]);
|
||||
if ( isset($_POST['widget-id']) ) {
|
||||
foreach ( (array) $_POST['widget-id'] as $key => $val ) {
|
||||
if ( !$val )
|
||||
unset($_POST['widget-id'][$key]);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the key numbering and store
|
||||
$new_sidebar = isset( $_POST['widget-id'] ) && is_array( $_POST['widget-id'] ) ? array_values( $_POST['widget-id'] ) : array();
|
||||
|
Loading…
Reference in New Issue
Block a user