summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/comment.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index aa27ea651..831544c0e 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1043,7 +1043,8 @@ function comment_render($node, $cid = 0) {
$output .= theme('comment_view', $comment, $node, $links);
}
}
- else {
+ // Only attempt to render comments if the node has been commented upon.
+ elseif ($node->comment_count) {
//TODO Convert to dynamic queries once the pager query is updated to the new DBTNG API.