From 7d7ef1d2e68310cc8e0988a926406cddd241c257 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 22 Oct 2021 22:42:25 +0200 Subject: 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(-) (limited to 'apps/workflowengine/lib/Entity') diff --git a/apps/workflowengine/lib/Entity/File.php b/apps/workflowengine/lib/Entity/File.php index 2c8701f0378..3f09fcd24a1 100644 --- a/apps/workflowengine/lib/Entity/File.php +++ b/apps/workflowengine/lib/Entity/File.php @@ -141,7 +141,7 @@ class File implements IEntity, IDisplayText, IUrl, IIcon, IContextPortation { 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; } -- cgit v1.2.3