Make WordPress Core


Ignore:
Timestamp:
06/15/2025 05:16:00 AM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Remove extra check in wp_authenticate_application_password().

This commit removes an unnecessary is_wp_error() check, as the WP_Error instance is created earlier in the method, and the only mutability is whether the instance actually ::has_errors().

Follow-up to [49109].

Props justlevine.
See #63268.

File:
1 edited

Legend:

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

    r60296 r60310  
    478478        do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password );
    479479
    480         if ( is_wp_error( $error ) && $error->has_errors() ) {
     480        if ( $error->has_errors() ) {
    481481            /** This action is documented in wp-includes/user.php */
    482482            do_action( 'application_password_failed_authentication', $error );
Note: See TracChangeset for help on using the changeset viewer.