From 818de3a656a0c74efb77edf5844c0220c6fffe90 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 15 Nov 2010 00:49:46 +0000 Subject: #963612 by chx, sun: Stop notices in templates if comment form doesn't exist. --- modules/comment/comment.module | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index ea79ea521..31738a566 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2334,6 +2334,8 @@ function template_preprocess_comment_wrapper(&$variables) { // Provide contextual information. $variables['node'] = $variables['content']['#node']; $variables['display_mode'] = variable_get('comment_default_mode_' . $variables['node']->type, COMMENT_MODE_THREADED); + // The comment form is optional and may not exist. + $variables['content'] += array('comment_form' => array()); } /** -- cgit v1.2.3