mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +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:
@@ -499,7 +499,7 @@ if ( ! WP_Filesystem( $credentials, ABSPATH, $allow_relaxed_file_ownership ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $wp_filesystem->errors->get_error_code() ) {
|
||||
if ( $wp_filesystem->errors->has_errors() ) {
|
||||
foreach ( $wp_filesystem->errors->get_error_messages() as $message ) {
|
||||
show_message( $message );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user