From 462c0c2b4402cded7e321a7f57e864f40690e425 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 29 Nov 2021 16:14:26 +0100 Subject: [permissionmanager] Fix for PHP 8 --- modules-available/permissionmanager/inc/permissionutil.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules-available/permissionmanager/inc/permissionutil.inc.php') 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)) { -- cgit v1.2.3-55-g7522