Skip to content

Commit

Permalink
Coding Standards: Revert strict comparison added in [59898].
Browse files Browse the repository at this point in the history
`$comment_approved` can be both a string or an integer, so this change had unintended consequences such as breaking WP-CLI tests.

See #62279.
Built from https://develop.svn.wordpress.org/trunk@59903


git-svn-id: https://core.svn.wordpress.org/trunk@59245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
swissspidy committed Mar 3, 2025
1 parent b78edf6 commit 2ffa87d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59902';
$wp_version = '6.8-alpha-59903';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 2ffa87d

Please sign in to comment.