Skip to content

Commit 631c13d

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 <jan@mtec-studios.ch>
1 parent 06aabff commit 631c13d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

lib/FilesHooks.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,17 @@ protected function getUserPathsFromPath($path, $uidOwner) {
570570
try {
571571
$node = $this->rootFolder->getUserFolder($uidOwner)->get($path);
572572
} catch (NotFoundException $e) {
573-
return [];
573+
return [
574+
'users' => [],
575+
'remotes' => [],
576+
];
574577
}
575578

576579
if (!$node instanceof Node) {
577-
return [];
580+
return [
581+
'users' => [],
582+
'remotes' => [],
583+
];
578584
}
579585

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

0 commit comments

Comments
 (0)