mirror of
git://develop.git.wordpress.org/
synced 2025-04-08 06:02:41 +02:00
Upgrade/Install: Avoid using unserialize()
unnecessarily.
Merges [52456] to the 5.8 branch. Props vortfu, xknown, dd32. git-svn-id: https://develop.svn.wordpress.org/branches/5.8@52463 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c09ccfbc54
commit
257814ebb4
@ -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…
x
Reference in New Issue
Block a user