Better way to handle an app having more than one etemplate2_before_exec hook - fixes collabora stopped working

This commit is contained in:
nathangray 2018-06-08 10:26:48 -06:00
parent 0d806be6fe
commit 67d8166b27

View File

@ -113,7 +113,7 @@ class Etemplate extends Etemplate\Widget\Template
{ {
if (!$extras) continue; 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'])) if ($extra['data'] && is_array($extra['data']))
{ {