WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/27/2018 02:30:46 AM (3 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-includes/class-wp-customize-setting.php

    r42747 r42761  
    595595        $validity = apply_filters( "customize_validate_{$this->id}", $validity, $value, $this );
    596596
    597         if ( is_wp_error( $validity ) && empty( $validity->errors ) ) {
     597        if ( is_wp_error( $validity ) && ! $validity->has_errors() ) {
    598598            $validity = true;
    599599        }
Note: See TracChangeset for help on using the changeset viewer.