Notice fix from apokalyptik

git-svn-id: https://develop.svn.wordpress.org/trunk@10225 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-18 22:26:03 +00:00
parent bc5d242e79
commit 7e7a7d04c0
1 changed files with 5 additions and 3 deletions

View File

@ -1041,9 +1041,11 @@ function remove_option_whitelist( $del_options, $options = '' ) {
}
foreach( $del_options as $page => $keys ) {
foreach( $keys as $key ) {
$pos = array_search( $key, $whitelist_options[ $page ] );
if( $pos !== false )
unset( $whitelist_options[ $page ][ $pos ] );
if ( isset($whitelist_options[ $page ]) && is_array($whitelist_options[ $page ]) ) {
$pos = array_search( $key, $whitelist_options[ $page ] );
if( $pos !== false )
unset( $whitelist_options[ $page ][ $pos ] );
}
}
}
return $whitelist_options;