Ticket #15215: wp_count_comments.15215.diff

File wp_count_comments.15215.diff, 586 bytes (added by batmoo, 3 years ago)
Line 
1Index: wp-includes/comment.php
2===================================================================
3--- wp-includes/comment.php     (revision 15962)
4+++ wp-includes/comment.php     (working copy)
5@@ -854,7 +854,7 @@
6                // Don't count post-trashed toward totals
7                if ( 'post-trashed' != $row['comment_approved'] && 'trash' != $row['comment_approved'] )
8                        $total += $row['num_comments'];
9-               if ( in_array( $row['comment_approved'], $known_types ) )
10+               if ( in_array( $row['comment_approved'], $known_types, true ) )
11                        $stats[$approved[$row['comment_approved']]] = $row['num_comments'];
12        }
13