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

Merges [57389] to 6.4 branch.

Props xknown, peterwilsoncc, jorbin, desrosj.

Built from https://develop.svn.wordpress.org/branches/6.4@57391


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin 2024-01-30 14:28:25 +00:00
parent a72cce1d6e
commit a6549f9381
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.4.3-alpha-57390';
$wp_version = '6.4.3-alpha-57391';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.