Check $comment_counts before using.
git-svn-id: https://develop.svn.wordpress.org/trunk@992 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4f49a4163d
commit
4f89c11350
@ -449,9 +449,11 @@ if ($posts) {
|
||||
WHERE post_status = 'publish' AND ID IN ($post_id_list)
|
||||
GROUP BY ID");
|
||||
|
||||
foreach ($comment_counts as $comment_count) {
|
||||
$comment_count_cache["$comment_count->ID"] = $comment_count->ccount;
|
||||
}
|
||||
if ($comment_counts) {
|
||||
foreach ($comment_counts as $comment_count) {
|
||||
$comment_count_cache["$comment_count->ID"] = $comment_count->ccount;
|
||||
}
|
||||
}
|
||||
|
||||
// Get post-meta info
|
||||
if ( $meta_list = $wpdb->get_results("
|
||||
|
Loading…
Reference in New Issue
Block a user