From 67d8166b275f3e5cfbee4e3ab3de5d4aa0683a74 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 8 Jun 2018 10:26:48 -0600 Subject: [PATCH] Better way to handle an app having more than one etemplate2_before_exec hook - fixes collabora stopped working --- 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 768198b309..d2dcc4e3a9 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]) || count($extras) ? $extras : array($extras) as $extra) + foreach(count(array_filter(array_keys($extras), 'is_int')) ? $extras : array($extras) as $extra) { if ($extra['data'] && is_array($extra['data'])) {