Install: When populating options, maybe_serialize instead of always serialize.

Props xknown, peterwilsoncc, jorbin, desrosj.

Built from https://develop.svn.wordpress.org/trunk@57389


git-svn-id: http://core.svn.wordpress.org/trunk@56895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2024-01-30 14:25:08 +00:00
parent a9b81d3527
commit fced238f35
2 changed files with 3 additions and 5 deletions

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

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57388';
$wp_version = '6.5-alpha-57389';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.