Skip to content

Commit abe0a29

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60310 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d2613da commit abe0a29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-includes/user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ function wp_authenticate_application_password(
477477
*/
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 );
483483

0 commit comments

Comments
 (0)