Make WordPress Core


Ignore:
Timestamp:
05/24/2015 08:44:09 AM (9 years ago)
Author:
dd32
Message:

Updates: Correctly identify more failed update cases. This checks for a WP_Error being raised during an individual update, in addition to just the bootstrap error cases.
The error message in these cases is still not displayed in the UI.

See #32473, #32435

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r32570 r32571  
    29232923    }
    29242924
    2925     $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() );
     2925    $skin = new Automatic_Upgrader_Skin();
     2926    $upgrader = new Plugin_Upgrader( $skin );
    29262927    $result = $upgrader->bulk_upgrade( array( $plugin ) );
    29272928
    2928     if ( is_array( $result ) ) {
     2929    if ( is_array( $result ) && empty( $result[$plugin] ) && is_wp_error( $skin->result ) ) {
     2930        $result = $skin->result;
     2931    }
     2932
     2933    if ( is_array( $result ) && !empty( $result[ $plugin ] ) ) {
    29292934        $plugin_update_data = current( $result );
    29302935
Note: See TracChangeset for help on using the changeset viewer.