From 916b2e71646c408d0041e46b248385075a7a3e4e Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 22 Oct 2021 22:42:25 +0200 Subject: [PATCH] fixes an undefined index when getAccessList returns an empty array - [] is a valid return value that should be honored as having no access Signed-off-by: Arthur Schiwon --- apps/workflowengine/lib/Entity/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/workflowengine/lib/Entity/File.php b/apps/workflowengine/lib/Entity/File.php index 9131caf888a7a..e780f82d08ef5 100644 --- a/apps/workflowengine/lib/Entity/File.php +++ b/apps/workflowengine/lib/Entity/File.php @@ -140,7 +140,7 @@ public function isLegitimatedForUserId(string $uid): bool { return true; } $acl = $this->shareManager->getAccessList($node, true, true); - return array_key_exists($uid, $acl['users']); + return isset($acl['users']) && array_key_exists($uid, $acl['users']); } catch (NotFoundException $e) { return false; }