From a53a1bd271aa5eda7b23b389afd58b7d5e681c2f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 12 Jun 2018 23:29:23 -0700 Subject: [PATCH] ArrayHtml - Avoid warning --- ext/afform/CRM/Afform/ArrayHtml.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/afform/CRM/Afform/ArrayHtml.php b/ext/afform/CRM/Afform/ArrayHtml.php index fa9089a66d..b20c1e0fb0 100644 --- a/ext/afform/CRM/Afform/ArrayHtml.php +++ b/ext/afform/CRM/Afform/ArrayHtml.php @@ -4,6 +4,7 @@ * Class CRM_Afform_ArrayHtml * * FIXME This a quick-and-dirty array<=>html mapping. + * FIXME: Comment mapping. */ class CRM_Afform_ArrayHtml { @@ -86,7 +87,7 @@ class CRM_Afform_ArrayHtml { $arr = ['#tag' => $node->tagName]; foreach ($node->attributes as $attribute) { $txt = $attribute->textContent; - if ($txt{0} === '{' && $txt{1} !== '{' && $this->allowStructuredAttribute($node->tagName, $attribute->name)) { + if ($txt && $txt{0} === '{' && $txt{1} !== '{' && $this->allowStructuredAttribute($node->tagName, $attribute->name)) { $arr[$attribute->name] = sprintf('PARSE-ME(%s)', $txt); } else { -- 2.25.1