strip slashes, block arrays in ms-edit.php, fixes #11778

git-svn-id: http://svn.automattic.com/wordpress/trunk@13115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-02-13 17:49:38 +00:00
parent 1d5b49f6f8
commit 29a9729ccf
1 changed files with 3 additions and 3 deletions

View File

@ -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++;
}
}