Make WordPress Core


Ignore:
Timestamp:
02/27/2018 02:30:46 AM (6 years ago)
Author:
SergeyBiryukov
Message:

General: Introduce WP_Error::has_errors() method and use it where appropriate.

Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r42719 r42761  
    14611461    }
    14621462
    1463     if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) {
     1463    if ( is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->has_errors() ) {
    14641464        return false;
    14651465    }
Note: See TracChangeset for help on using the changeset viewer.