strip slashes, block arrays in ms-edit.php, fixes #11778
git-svn-id: https://develop.svn.wordpress.org/trunk@13115 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ad16d49cbb
commit
a2e14c070b
@ -201,12 +201,12 @@ switch ( $_GET['action'] ) {
|
||||
$c = 1;
|
||||
$count = count( $_POST[ 'option' ] );
|
||||
foreach ( (array) $_POST['option'] as $key => $val ) {
|
||||
if ( $key === 0 )
|
||||
if ( $key === 0 || is_array( $val ) )
|
||||
continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
|
||||
if ( $c == $count )
|
||||
update_option( $key, $val );
|
||||
update_option( $key, stripslashes( $val ) );
|
||||
else
|
||||
update_option( $key, $val, false ); // no need to refresh blog details yet
|
||||
update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user