Skip to content

Commit f8ca7e6

Browse files
Ensure NOT IN note is not added twice
1 parent 45e7347 commit f8ca7e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/wp-includes/class-wp-comment-query.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,11 @@ protected function get_comment_ids() {
771771
);
772772

773773
// @since 6.9.0 Exclude the 'note' comment type, unless 'all' types or the 'note' type explicitly are requested.
774-
if ( ! in_array( 'all', $raw_types['IN'], true ) && ! in_array( 'note', $raw_types['IN'], true ) ) {
774+
if (
775+
! in_array( 'all', $raw_types['IN'], true ) &&
776+
! in_array( 'note', $raw_types['IN'], true ) &&
777+
! in_array( 'note', $raw_types['NOT IN'], true )
778+
) {
775779
$raw_types['NOT IN'][] = 'note';
776780
}
777781

0 commit comments

Comments
 (0)