From 56c51da216ed674d9b7aa7bf1435cd1060c4d44e Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 14 Jul 2015 08:00:31 +0000 Subject: [PATCH] Updates: When performing an ajax plugin update, rely upon `wp_update_plugins()` to check the contents of the transient and return early if no request needs to be made. This works around a bug where custom update handlers are injecting an update into an empty transient, malforming the transient and causing update failures. Fixes #32198 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@33257 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index ce4827a806..99b7d1576a 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -2969,10 +2969,7 @@ function wp_ajax_update_plugin() { include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); - $current = get_site_transient( 'update_plugins' ); - if ( empty( $current ) ) { - wp_update_plugins(); - } + wp_update_plugins(); $skin = new Automatic_Upgrader_Skin(); $upgrader = new Plugin_Upgrader( $skin );