mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Updates: Add a generic failure case to the ajax update endpoint for when the WP_Error value hasn't been found.
See #34403 git-svn-id: https://develop.svn.wordpress.org/trunk@35371 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3098,6 +3098,7 @@ function wp_ajax_update_plugin() {
|
||||
* For now, surface some sort of error here.
|
||||
*/
|
||||
if ( $plugin_update_data === true ) {
|
||||
$status['error'] = __( 'Plugin update failed.' );
|
||||
wp_send_json_error( $status );
|
||||
}
|
||||
|
||||
@@ -3124,6 +3125,10 @@ function wp_ajax_update_plugin() {
|
||||
|
||||
wp_send_json_error( $status );
|
||||
|
||||
} else {
|
||||
// An unhandled error occured
|
||||
$status['error'] = __( 'Plugin update failed.' );
|
||||
wp_send_json_error( $status );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user