Make WordPress Core

Changeset 51528


Ignore:
Timestamp:
08/02/2021 08:54:44 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    r49788 r51528  
    348348                        );
    349349
    350                         $results[ $plugin ] = $this->result;
     350                        $results[ $plugin ] = $result;
    351351
    352352                        // Prevent credentials auth screen from displaying multiple times.
  • trunk/src/wp-admin/includes/class-theme-upgrader.php

    r49788 r51528  
    449449                        );
    450450
    451                         $results[ $theme ] = $this->result;
     451                        $results[ $theme ] = $result;
    452452
    453453                        // Prevent credentials auth screen from displaying multiple times.
Note: See TracChangeset for help on using the changeset viewer.