From: Hypolite Petovan Date: Fri, 29 Nov 2019 16:39:49 +0000 (-0500) Subject: Ensure the existence of expected default permission keys in ACL::getFullSelectorHTML X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0ff4381305457dcb01fcd735a1766f391c5d8ede;p=friendica.git Ensure the existence of expected default permission keys in ACL::getFullSelectorHTML - Addresses https://sozialwolke.net/display/703b8751-145d-e11f-a923-98e999239905 --- diff --git a/src/Core/ACL.php b/src/Core/ACL.php index 880a1e47ff..0eb2ecc8b3 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -333,6 +333,13 @@ class ACL extends BaseObject // Defaults user permissions if (empty($default_permissions)) { $default_permissions = self::getDefaultUserPermissions($user); + } else { + $default_permissions = [ + 'allow_cid' => $default_permissions['allow_cid'] ?? [], + 'allow_gid' => $default_permissions['allow_gid'] ?? [], + 'deny_cid' => $default_permissions['deny_cid'] ?? [], + 'deny_gid' => $default_permissions['deny_gid'] ?? [], + ]; } if (count($default_permissions['allow_cid'])