mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Administration: Fix failing tests as a result of [48397].
Because of changes to how PHP handles arrays used in `foreach()` loops in PHP >= 7.0, [48397] resulted in a failing test for PHP 5.6. This calls `reset()` after using the `$results` array in the `foreach()` to ensure the array is treated the same and as expected. Props azaozz, desrosj, SergeyBiryukov, xknown. See #50448. Built from https://develop.svn.wordpress.org/trunk@48401 git-svn-id: http://core.svn.wordpress.org/trunk@48170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a8521d48ac
commit
500508884e
@ -392,6 +392,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
unset( $past_failure_emails[ $plugin ] );
|
unset( $past_failure_emails[ $plugin ] );
|
||||||
}
|
}
|
||||||
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
|
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
|
||||||
|
reset( $results );
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
@ -501,6 +501,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
unset( $past_failure_emails[ $theme ] );
|
unset( $past_failure_emails[ $theme ] );
|
||||||
}
|
}
|
||||||
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
|
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
|
||||||
|
reset( $results );
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-48400';
|
$wp_version = '5.5-alpha-48401';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user