Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.617.2.2 diff -u -p -r1.617.2.2 comment.module --- modules/comment/comment.module 25 Apr 2008 20:58:46 -0000 1.617.2.2 +++ modules/comment/comment.module 16 Jun 2008 07:04:55 -0000 @@ -594,8 +594,10 @@ function comment_form_alter(&$form, $for function comment_nodeapi(&$node, $op, $arg = 0) { switch ($op) { case 'load': - return db_fetch_array(db_query("SELECT last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid = %d", $node->nid)); - break; + if ($node->comment != COMMENT_NODE_DISABLED) { + return db_fetch_array(db_query("SELECT last_comment_timestamp, last_comment_name, comment_count FROM {node_comment_statistics} WHERE nid = %d", $node->nid)); + } + return array('last_comment_timestamp' => $node->created, 'last_comment_name' => '', 'comment_count' => 0); case 'prepare': if (!isset($node->comment)) {