From cc21c823dd4487f9949d505a9f182fe237244ddd Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 5 Jun 2018 15:34:54 -0600 Subject: [PATCH] Handle an app having more than one etemplate2_before_exec hook --- api/src/Etemplate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index 323a730d2c..768198b309 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -113,7 +113,7 @@ class Etemplate extends Etemplate\Widget\Template { if (!$extras) continue; - foreach(isset($extras[0]) ? $extras : array($extras) as $extra) + foreach(isset($extras[0]) || count($extras) ? $extras : array($extras) as $extra) { if ($extra['data'] && is_array($extra['data'])) {