From 005a01da4a9d62c183b1a95baea12fd41fb99ec6 Mon Sep 17 00:00:00 2001 From: ocean90 Date: Wed, 21 Sep 2016 17:37:02 +0000 Subject: [PATCH] Comments: Revert [38298]. Instead use the correct comparison operator which was changed in [38297]. Fixes #37416. git-svn-id: https://develop.svn.wordpress.org/trunk@38639 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-comment-query.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 ] ); }