Comments: in `WP_Comment_Query::fill_descendants()`, `continue` if there is an empty array in the loop.

See #37416, [38297].


git-svn-id: https://develop.svn.wordpress.org/trunk@38298 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2016-08-21 06:42:44 +00:00
parent f6fced867b
commit 2e111412f9
1 changed files with 3 additions and 0 deletions

View File

@ -1013,6 +1013,9 @@ 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;
}
$descendant_ids = array_merge( $descendant_ids, $levels[ $i ] );
}