summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2021-10-22 22:42:25 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-10-23 12:48:51 +0000
commit5145675d43082d18b790eda1a85d666276ab071b (patch)
treea4026de353b9d89ce19a3e7a2384ebda59ca9560
parent99b151e87a2ba08d640102c1fb410e7a43a774f6 (diff)
downloadnextcloud-server-5145675d43082d18b790eda1a85d666276ab071b.tar.gz
nextcloud-server-5145675d43082d18b790eda1a85d666276ab071b.zip
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>
-rw-r--r--apps/workflowengine/lib/Entity/File.php2
1 files changed, 1 insertions, 1 deletions
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;
}