fix(filesintegration): Correctly handle optional values for file integration

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2025-12-05 10:39:31 +01:00
parent 0c48ca8a87
commit 53619b3154
No known key found for this signature in database
GPG key ID: F72FA5B49FFA96B0

View file

@ -45,6 +45,7 @@ class Util {
$node = array_shift($nodes);
$accessList = $this->shareManager->getAccessList($node);
$accessList['users'] ??= [];
if (!$node->getStorage()->instanceOfStorage(SharedStorage::class)) {
// The file is not a shared file,
// let's check the accesslist for mount points of groupfolders and external storages
@ -76,7 +77,7 @@ class Util {
$node = array_shift($nodes);
$accessList = $this->shareManager->getAccessList($node, false);
$this->publicAccessLists[$fileId] = $accessList['public'];
$this->publicAccessLists[$fileId] = $accessList['public'] ?? false;
}
return $this->publicAccessLists[$fileId] === true;
}