Browse Source

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 <blizzz@arthur-schiwon.de>
pull/29400/head
Arthur Schiwon 4 years ago
parent
commit
7d7ef1d2e6
No known key found for this signature in database GPG Key ID: 7424F1874854DF23
  1. 2
      apps/workflowengine/lib/Entity/File.php

2
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;
}

Loading…
Cancel
Save