From 6e9a28ea7916f8adf65f925f941425c47aa70acd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Mon, 12 Nov 2018 20:12:57 +0100
Subject: [PATCH] :ambulance: fix(template) Fix PHP error when no modifiers are
 used on a field

issue #5882
---
 include/class_templateHandling.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/class_templateHandling.inc b/include/class_templateHandling.inc
index ede860436..72867713f 100644
--- a/include/class_templateHandling.inc
+++ b/include/class_templateHandling.inc
@@ -133,6 +133,8 @@ class templateHandling
       $result = $attrs[$mask];
       if (is_array($result)) {
         unset($result['count']);
+      } else {
+        $result = array($result);
       }
     } elseif (($mask != '') && !preg_match('/c/', $modifiers)) {
       trigger_error("'$mask' was not found in attributes");
-- 
GitLab