mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov. Fixes #42742. git-svn-id: https://develop.svn.wordpress.org/trunk@42761 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -865,7 +865,7 @@ function delete_plugins( $plugins, $deprecated = '' ) {
|
||||
return new WP_Error( 'fs_unavailable', __( 'Could not access filesystem.' ) );
|
||||
}
|
||||
|
||||
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
|
||||
if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->has_errors() ) {
|
||||
return new WP_Error( 'fs_error', __( 'Filesystem error.' ), $wp_filesystem->errors );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user