Upgrade/Install: Avoid using `unserialize()` unnecessarily.
Props vortfu, xknown, dd32. Built from https://develop.svn.wordpress.org/trunk@52456 git-svn-id: http://core.svn.wordpress.org/trunk@52048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9c4dabcc1
commit
638ef7815e
|
@ -1625,8 +1625,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 ) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52455';
|
||||
$wp_version = '6.0-alpha-52456';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue