Upgrade/Install: Store correct result when bulk updating plugins or themes.

This ensures that when multiple plugins or themes are updated and one succeeds and another fails, the error is reported accordingly.

Previously, both updates would end up treated as a success, due to `$this->result` containing the result of the previous operation and not the current one.

Follow-up to [12097].

Props pwtyler, afragen.
Fixes #53002.
Built from https://develop.svn.wordpress.org/trunk@51528


git-svn-id: http://core.svn.wordpress.org/trunk@51139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-08-02 20:55:56 +00:00
parent b186e19855
commit 9a4280c75f
3 changed files with 3 additions and 3 deletions

View File

@ -347,7 +347,7 @@ class Plugin_Upgrader extends WP_Upgrader {
)
);
$results[ $plugin ] = $this->result;
$results[ $plugin ] = $result;
// Prevent credentials auth screen from displaying multiple times.
if ( false === $result ) {

View File

@ -448,7 +448,7 @@ class Theme_Upgrader extends WP_Upgrader {
)
);
$results[ $theme ] = $this->result;
$results[ $theme ] = $result;
// Prevent credentials auth screen from displaying multiple times.
if ( false === $result ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51527';
$wp_version = '5.9-alpha-51528';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.