diff options
author | Simon Rettberg | 2021-11-29 16:14:26 +0100 |
---|---|---|
committer | Simon Rettberg | 2022-03-09 15:06:54 +0100 |
commit | 462c0c2b4402cded7e321a7f57e864f40690e425 (patch) | |
tree | 4d3a669d38ee5f62cd320b277c0c2056cc8aa8a9 /modules-available/permissionmanager/inc/permissionutil.inc.php | |
parent | [statistics] Remove debug spam (diff) | |
download | slx-admin-462c0c2b4402cded7e321a7f57e864f40690e425.tar.gz slx-admin-462c0c2b4402cded7e321a7f57e864f40690e425.tar.xz slx-admin-462c0c2b4402cded7e321a7f57e864f40690e425.zip |
[permissionmanager] Fix for PHP 8
Diffstat (limited to 'modules-available/permissionmanager/inc/permissionutil.inc.php')
-rw-r--r-- | modules-available/permissionmanager/inc/permissionutil.inc.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules-available/permissionmanager/inc/permissionutil.inc.php b/modules-available/permissionmanager/inc/permissionutil.inc.php index 48ebb77e..20023281 100644 --- a/modules-available/permissionmanager/inc/permissionutil.inc.php +++ b/modules-available/permissionmanager/inc/permissionutil.inc.php @@ -268,7 +268,8 @@ class PermissionUtil continue; foreach ($data as $perm => $permissionFlags) { $description = Dictionary::translateFileModule($moduleId, "permissions", $perm); - self::putInPermissionTree($moduleId . "." . $perm, $permissionFlags['location-aware'], $description, $permissions); + self::putInPermissionTree($moduleId . "." . $perm, $permissionFlags['location-aware'] ?? false, + $description, $permissions); } } ksort($permissions); @@ -277,6 +278,7 @@ class PermissionUtil foreach ($permissions as $module => $v) { $sortingOrder[Module::get($module)->getCategory()][] = $module; } + $sortingOrder = array_values($sortingOrder); $permissions = array_replace(array_flip(call_user_func_array('array_merge', $sortingOrder)), $permissions); foreach ($permissions as $module => $v) { if (is_int($v)) { |