diff --git a/include/class_template.inc b/include/class_template.inc
index 58517ba1c0159e1c996a1e514c607c8235337719..afa92cad126f7ed82540e618812c68e0703a2d67 100644
--- a/include/class_template.inc
+++ b/include/class_template.inc
@@ -276,7 +276,7 @@ class template
       $specialAttrs['caller'.strtoupper($attr)] = $ui->$attr;
     }
     $this->attrs = templateHandling::parseArray($this->attrs, $specialAttrs);
-    $this->tabObject->adapt_from_template($this->attrs, array_merge(...$this->attributes));
+    $this->tabObject->adapt_from_template($this->attrs, array_merge(...array_values($this->attributes)));
 
     $this->applied = TRUE;
     return $this->tabObject;
diff --git a/include/class_templateHandling.inc b/include/class_templateHandling.inc
index 88e28157b0bf85794a9bf9042ae275a9ba6ecb3e..1bffdc7f5d81395a827ca477ff5523c3aedc0da4 100644
--- a/include/class_templateHandling.inc
+++ b/include/class_templateHandling.inc
@@ -176,7 +176,7 @@ class templateHandling
         unset($attrs[$attr]);
       }
     }
-    $dependencies = array_unique(array_merge(...$flatdepends));
+    $dependencies = array_unique(array_merge(...array_values($flatdepends)));
     foreach ($dependencies as $attr) {
       if (empty($flatdepends[$attr])) {
         $needed[] = $attr;
diff --git a/plugins/admin/groups/class_roleGeneric.inc b/plugins/admin/groups/class_roleGeneric.inc
index 7d16dcb54a11f571d8aa0f17685ceed668567853..10826f81e4d8ae4e9ff611b94b6a32ee6e1503c8 100644
--- a/plugins/admin/groups/class_roleGeneric.inc
+++ b/plugins/admin/groups/class_roleGeneric.inc
@@ -32,7 +32,7 @@ class RoleMembersAttribute extends UsersAttribute
         if (empty($groups)) {
           $this->whitelistDns = array();
         } else {
-          $this->whitelistDns = array_merge_recursive(...$groups)['member'];
+          $this->whitelistDns = array_merge_recursive(...array_values($groups))['member'];
         }
       }
       return array(