From d9b9fa5dba90470233a70e6fb01aa4a28ece8856 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 21 Feb 2025 00:33:04 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp_delete_comment()`. Follow-up to [3271], [47219]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59852 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 8f42871b90..80e4c1e238 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -1528,7 +1528,7 @@ function wp_delete_comment( $comment_id, $force_delete = false ) { do_action( 'deleted_comment', $comment->comment_ID, $comment ); $post_id = $comment->comment_post_ID; - if ( $post_id && 1 == $comment->comment_approved ) { + if ( $post_id && '1' === $comment->comment_approved ) { wp_update_comment_count( $post_id ); }