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 git-svn-id: https://develop.svn.wordpress.org/trunk@32571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8d64dc4e6b
commit
d8dc5d9f63
@ -2922,10 +2922,15 @@ function wp_ajax_update_plugin() {
|
||||
wp_update_plugins();
|
||||
}
|
||||
|
||||
$upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() );
|
||||
$skin = new Automatic_Upgrader_Skin();
|
||||
$upgrader = new Plugin_Upgrader( $skin );
|
||||
$result = $upgrader->bulk_upgrade( array( $plugin ) );
|
||||
|
||||
if ( is_array( $result ) ) {
|
||||
if ( is_array( $result ) && empty( $result[$plugin] ) && is_wp_error( $skin->result ) ) {
|
||||
$result = $skin->result;
|
||||
}
|
||||
|
||||
if ( is_array( $result ) && !empty( $result[ $plugin ] ) ) {
|
||||
$plugin_update_data = current( $result );
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user