From a37b3cf699596bd154b900ce8f67dbc7b701abdc Mon Sep 17 00:00:00 2001
From: root <root@postoffice.intern>
Date: Tue, 22 Aug 2023 16:09:02 +0200
Subject: [PATCH 08/13] include/class_acl.inc: Fix array_keys being called with
 a string instead of array at param. #1.

Closes: #1049940
---
 include/class_acl.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/class_acl.inc b/include/class_acl.inc
index cd77c17..68b0410 100644
--- a/include/class_acl.inc
+++ b/include/class_acl.inc
@@ -673,7 +673,8 @@ class acl extends plugin
                 // Create a map of all used sections, this allows us to simply hide the remove button
                 //  if no acl is configured for the given section
                 // e.g. ';all;department/country;users/user;
-                $usedList = ";".implode(';', array_keys($this->aclContents)).";";
+                $array_keys = array_keys(is_array($this->aclContents) ? $this->aclContents : array());
+                $usedList = ";" . implode(';', $array_keys) . ";";
 
                 /* Add settings for all categories to the (permanent) list */
                 $data = $lData = array();
-- 
2.39.2

