diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php index 573115a952..a4429c97ec 100644 --- a/src/wp-includes/class-wp-comment-query.php +++ b/src/wp-includes/class-wp-comment-query.php @@ -1020,10 +1020,7 @@ class WP_Comment_Query { // Prime comment caches for non-top-level comments. $descendant_ids = array(); - for ( $i = 1, $c = count( $levels ); $i <= $c; $i++ ) { - if ( empty( $levels[ $i ] ) ) { - continue; - } + for ( $i = 1, $c = count( $levels ); $i < $c; $i++ ) { $descendant_ids = array_merge( $descendant_ids, $levels[ $i ] ); }