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:
Dougal Campbell 2004-03-24 14:45:48 +00:00
parent 4f49a4163d
commit 4f89c11350

View File

@ -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("