mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01: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 ] );
|
||||
}
|
||||
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
|
||||
reset( $results );
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
@ -501,6 +501,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||
unset( $past_failure_emails[ $theme ] );
|
||||
}
|
||||
update_option( 'auto_plugin_theme_update_emails', $past_failure_emails );
|
||||
reset( $results );
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @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.
|
||||
|
Loading…
Reference in New Issue
Block a user