From 89bcb3d48129a46097df50f4b94007d8e595c115 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Wed, 26 Jul 2017 11:42:04 +0200 Subject: [PATCH] Ensure module work althought not exists body field --- modules/nodecomment/includes/nodecomment.forms.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nodecomment/includes/nodecomment.forms.inc b/modules/nodecomment/includes/nodecomment.forms.inc index ec9d578..d55563c 100644 --- a/modules/nodecomment/includes/nodecomment.forms.inc +++ b/modules/nodecomment/includes/nodecomment.forms.inc @@ -151,7 +151,7 @@ function _nodecomment_alter_nodecomment_form(&$form, $node, $target_node = NULL, $form['comment_settings']['#access'] = FALSE; // Remove the teaser splitter if body field is present. - if (isset($form['body_field'])) { + if (isset($form['body_field']) && is_array($form['body_field']['#after_build'])) { $teaser_js_build = array_search('node_teaser_js', $form['body_field']['#after_build']); unset($form['body_field']['#after_build'][$teaser_js_build]); $form['body_field']['teaser_js']['#access'] = FALSE;