mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Install: When populating options, maybe_serialize instead of always serialize.
Props xknown, peterwilsoncc, jorbin, desrosj. git-svn-id: https://develop.svn.wordpress.org/trunk@57389 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9573b33d97
commit
a172e31c9e
@ -599,14 +599,12 @@ function populate_options( array $options = array() ) {
|
||||
$autoload = 'yes';
|
||||
}
|
||||
|
||||
if ( is_array( $value ) ) {
|
||||
$value = serialize( $value );
|
||||
}
|
||||
|
||||
if ( ! empty( $insert ) ) {
|
||||
$insert .= ', ';
|
||||
}
|
||||
|
||||
$value = maybe_serialize( sanitize_option( $option, $value ) );
|
||||
|
||||
$insert .= $wpdb->prepare( '(%s, %s, %s)', $option, $value, $autoload );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user