Skip to content

Commit e63aa5f

Browse files
committed
changes accesslist default result from empty array to skeleton
uses same skeleton as in nextcloud server sharehelper to prevent access array offset errors Signed-off-by: Jan Messer <[email protected]>
1 parent e22ba18 commit e63aa5f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/FilesHooks.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
576576
try {
577577
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
578578
} catch (NotFoundException $e) {
579-
return [];
579+
return [
580+
'users' => [],
581+
'remotes' => [],
582+
];
580583
}
581584

582585
if (!$node instanceof Node) {
583-
return [];
586+
return [
587+
'users' => [],
588+
'remotes' => [],
589+
];
584590
}
585591

586592
$accessList = $this->shareHelper->getPathsForAccessList($node);

0 commit comments

Comments
 (0)