mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 09:34:41 +00:00
Upgrade/Install: Avoid using unserialize() unnecessarily.
Props vortfu, xknown, dd32. git-svn-id: https://develop.svn.wordpress.org/trunk@52456 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user