Comments: In `comments_template()`, set `$wp_query->comments_by_type` to empty array if not separating comments. The value becomes stale otherwise. Edge case.

Props jakub.tyrcha.
Fixes #14809.

Built from https://develop.svn.wordpress.org/trunk@34503


git-svn-id: http://core.svn.wordpress.org/trunk@34467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-24 16:31:24 +00:00
parent b818747870
commit 595bad9f37
2 changed files with 3 additions and 1 deletions

View File

@ -1240,6 +1240,8 @@ function comments_template( $file = '/comments.php', $separate_comments = false
if ( $separate_comments ) {
$wp_query->comments_by_type = separate_comments($comments);
$comments_by_type = &$wp_query->comments_by_type;
} else {
$wp_query->comments_by_type = array();
}
$overridden_cpage = false;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34502';
$wp_version = '4.4-alpha-34503';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.