Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp_handle_comment_submiss…
Browse files Browse the repository at this point in the history
…ion()`.

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
  • Loading branch information
SergeyBiryukov committed Dec 22, 2024
1 parent d030306 commit 07be244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', __( '<strong>Error:</strong> Please fill the required fields.' ), 200 );
} elseif ( ! is_email( $comment_author_email ) ) {
return new WP_Error( 'require_valid_email', __( '<strong>Error:</strong> Please enter a valid email address.' ), 200 );
Expand Down

0 comments on commit 07be244

Please sign in to comment.