summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorSergey Biryukov <sergeybiryukov@git.wordpress.org>2025-06-15 05:16:00 +0000
committerSergey Biryukov <sergeybiryukov@git.wordpress.org>2025-06-15 05:16:00 +0000
commitabe0a29efd16ff1c317f4a7c330e89086a8c3cf9 (patch)
tree152d3cdd7575e3ac3c504e2577017852641da22b /src
parentd2613dae28655792b8a65f1fea86e238c243554a (diff)
downloadwordpress-trunk.tar.gz
wordpress-trunk.zip
Coding Standards: Remove extra check in `wp_authenticate_application_password()`.HEADtrunk
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
Diffstat (limited to 'src')
-rw-r--r--src/wp-includes/user.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
index 4dacf58628..ecd22ab38c 100644
--- a/src/wp-includes/user.php
+++ b/src/wp-includes/user.php
@@ -477,7 +477,7 @@ function wp_authenticate_application_password(
*/
do_action( 'wp_authenticate_application_password_errors', $error, $user, $item, $password );
- if ( is_wp_error( $error ) && $error->has_errors() ) {
+ if ( $error->has_errors() ) {
/** This action is documented in wp-includes/user.php */
do_action( 'application_password_failed_authentication', $error );