Check $comment_counts before using.
git-svn-id: http://svn.automattic.com/wordpress/trunk@992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea9cc3ff81
commit
ea4cecf6eb
|
@ -449,9 +449,11 @@ if ($posts) {
|
||||||
WHERE post_status = 'publish' AND ID IN ($post_id_list)
|
WHERE post_status = 'publish' AND ID IN ($post_id_list)
|
||||||
GROUP BY ID");
|
GROUP BY ID");
|
||||||
|
|
||||||
foreach ($comment_counts as $comment_count) {
|
if ($comment_counts) {
|
||||||
$comment_count_cache["$comment_count->ID"] = $comment_count->ccount;
|
foreach ($comment_counts as $comment_count) {
|
||||||
}
|
$comment_count_cache["$comment_count->ID"] = $comment_count->ccount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get post-meta info
|
// Get post-meta info
|
||||||
if ( $meta_list = $wpdb->get_results("
|
if ( $meta_list = $wpdb->get_results("
|
||||||
|
|
Loading…
Reference in New Issue