Upgrade/Install: Avoid using `unserialize()` unnecessarily.
Merges [52456] to the 5.8 branch. Props vortfu, xknown, dd32. Built from https://develop.svn.wordpress.org/branches/5.8@52463 git-svn-id: http://core.svn.wordpress.org/branches/5.8@52055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d20ea9c50
commit
66bb979049
|
@ -1612,8 +1612,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 ) {
|
||||
|
|
Loading…
Reference in New Issue