Commit 818de3a6 authored by webchick's avatar webchick
Browse files

#963612 by chx, sun: Stop notices in templates if comment form doesn't exist.

parent 14d2f790
......@@ -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());
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment