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:
Aaron Jorbin 2024-01-30 14:23:06 +00:00
parent 9573b33d97
commit a172e31c9e

View File

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