From 07be2445e45066147105206da08acf31bcee974d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 22 Dec 2024 22:42:35 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp_handle_comment_submission()`. Follow-up to [549], [1985], [2464], [2556], [2558], [34799], [40667]. Props deepakrohilla, narenin. See #62316. git-svn-id: https://develop.svn.wordpress.org/trunk@59556 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 4360f14d09554..2762b77593308 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -3658,7 +3658,7 @@ function wp_handle_comment_submission( $comment_data ) { $comment_type = 'comment'; if ( get_option( 'require_name_email' ) && ! $user->exists() ) { - if ( '' == $comment_author_email || '' == $comment_author ) { + if ( '' === $comment_author_email || '' === $comment_author ) { return new WP_Error( 'require_name_email', __( 'Error: Please fill the required fields.' ), 200 ); } elseif ( ! is_email( $comment_author_email ) ) { return new WP_Error( 'require_valid_email', __( 'Error: Please enter a valid email address.' ), 200 );