From 1b236aa435e87deaf7baeb63cfa794c0daf08124 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 3 Mar 2025 09:03:26 +0000 Subject: [PATCH] Coding Standards: Revert strict comparison added in [59898]. `$comment_approved` can be both a string or an integer, so this change had unintended consequences such as breaking WP-CLI tests. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59903 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 767441f400..47f8eb9665 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2071,7 +2071,7 @@ function wp_insert_comment( $commentdata ) { $id = (int) $wpdb->insert_id; - if ( 1 === $comment_approved ) { + if ( 1 == $comment_approved ) { wp_update_comment_count( $comment_post_id ); $data = array();