Upgrade/Install: Avoid using unserialize() unnecessarily.

Merges [52456] to the 5.9 branch.
Props vortfu, xknown, dd32.
Built from https://develop.svn.wordpress.org/branches/5.9@52462


git-svn-id: http://core.svn.wordpress.org/branches/5.9@52054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj
2022-01-06 17:28:01 +00:00
parent ff2e2ddcff
commit 742cbf86f3
2 changed files with 3 additions and 3 deletions

View File

@@ -1621,8 +1621,8 @@ function upgrade_280() {
$start = 0;
while ( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) {
foreach ( $rows as $row ) {
$value = $row->option_value;
if ( ! @unserialize( $value ) ) {
$value = maybe_unserialize( $row->option_value );
if ( $value === $row->option_value ) {
$value = stripslashes( $value );
}
if ( $value !== $row->option_value ) {

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-RC1-52460';
$wp_version = '5.9-RC1-52462';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.