Upgrade/Install: In WP_Ajax_Upgrader_Skin
, call ::get_error_codes()
method on a WP_Error
object $this->errors
instead of a string variable $errors
.
Props yrpwayne. Fixes #41449. git-svn-id: https://develop.svn.wordpress.org/trunk@41157 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e814f49f74
commit
f3368725ac
@ -99,7 +99,7 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
|
||||
}
|
||||
|
||||
// Count existing errors to generate an unique error code.
|
||||
$errors_count = count( $errors->get_error_codes() );
|
||||
$errors_count = count( $this->errors->get_error_codes() );
|
||||
$this->errors->add( 'unknown_upgrade_error_' . $errors_count + 1 , $string );
|
||||
} elseif ( is_wp_error( $errors ) ) {
|
||||
foreach ( $errors->get_error_codes() as $error_code ) {
|
||||
|
Loading…
Reference in New Issue
Block a user