Skip to content

Commit 717158e

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51528 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 80ccb36 commit 717158e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wp-admin/includes/class-plugin-upgrader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function bulk_upgrade( $plugins, $args = array() ) {
347347
)
348348
);
349349

350-
$results[ $plugin ] = $this->result;
350+
$results[ $plugin ] = $result;
351351

352352
// Prevent credentials auth screen from displaying multiple times.
353353
if ( false === $result ) {

src/wp-admin/includes/class-theme-upgrader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public function bulk_upgrade( $themes, $args = array() ) {
448448
)
449449
);
450450

451-
$results[ $theme ] = $this->result;
451+
$results[ $theme ] = $result;
452452

453453
// Prevent credentials auth screen from displaying multiple times.
454454
if ( false === $result ) {

0 commit comments

Comments
 (0)