Administration: Handle the result of Plugin_Upgrader::bulk_upgrade() for a plugin that is already at the latest version in the same way it is handled for themes.

This corrects a fragile check of the result in `wp_ajax_update_plugin()` that depended on the internal array pointer, and brings some consistency with `wp_ajax_update_theme()`.

Follow-up to [37714], [48401].
See #50448.

git-svn-id: https://develop.svn.wordpress.org/trunk@48445 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
SergeyBiryukov
2020-07-12 01:14:01 +00:00
parent 7cf1e60543
commit 9d30b02ed1
5 changed files with 11 additions and 10 deletions

View File

@@ -157,7 +157,7 @@ class Tests_Ajax_Update_Plugin extends WP_Ajax_UnitTestCase {
'slug' => 'hello-dolly',
'plugin' => 'hello.php',
'pluginName' => 'Hello Dolly',
'errorMessage' => 'Plugin update failed.',
'errorMessage' => 'The plugin is at the latest version.',
'oldVersion' => 'Version 1.7.2',
'newVersion' => '',
'debug' => array( 'The plugin is at the latest version.' ),