WordPress.org

Make WordPress Core

Changeset 13115


Ignore:
Timestamp:
02/13/2010 05:49:38 PM (8 years ago)
Author:
wpmuguru
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-edit.php

    r13106 r13115  
    202202            $count = count( $_POST[ 'option' ] );
    203203            foreach ( (array) $_POST['option'] as $key => $val ) {
    204                 if ( $key === 0 )
     204                if ( $key === 0 || is_array( $val ) )
    205205                    continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
    206206                if ( $c == $count )
    207                     update_option( $key, $val );
     207                    update_option( $key, stripslashes( $val ) );
    208208                else
    209                     update_option( $key, $val, false ); // no need to refresh blog details yet
     209                    update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet
    210210                $c++;
    211211            }
Note: See TracChangeset for help on using the changeset viewer.