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/29420/head
Arthur Schiwon 5 years ago committed by backportbot[bot]
parent a87643a9e0
commit d3576d32ae
  1. 2
      apps/workflowengine/lib/Entity/File.php

@ -140,7 +140,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