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

Built from https://develop.svn.wordpress.org/trunk@33257


git-svn-id: http://core.svn.wordpress.org/trunk@33229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-07-14 08:01:25 +00:00
parent c5bd85552e
commit 43077a6ef8
2 changed files with 2 additions and 5 deletions

View File

@ -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 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-beta2-33256';
$wp_version = '4.3-beta2-33257';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.