mirror of
git://develop.git.wordpress.org/
synced 2025-04-11 15:42:03 +02:00
Upgrade/Install: Avoid using unserialize()
unnecessarily.
Merges [52456] to the 5.9 branch. Props vortfu, xknown, dd32. git-svn-id: https://develop.svn.wordpress.org/branches/5.9@52462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
73421fa84f
commit
6677fc31a0
@ -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 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user