Skip to content
Snippets Groups Projects
Commit 818de3a6 authored by Angie Byron's avatar Angie Byron
Browse files

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

parent 14d2f790
Branches
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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());
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment