Skip to content

Commit bbdcf11

Browse files
committed
fix access array offset which doesn't exist and check if returned value is null
This check is used since default array is empty if user folder was not found Signed-off-by: Jan Messer <jan@mtec-studios.ch>
1 parent 22bf3f2 commit bbdcf11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/FilesHooks.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,10 @@ protected function fileMoving($oldPath, $newPath) {
396396
}
397397
$accessList = $this->getUserPathsFromPath($parentPath, $parentOwner);
398398
$affectedUsers = $accessList['users'];
399-
$oldUsers = $this->oldAccessList['users'];
399+
if(!isset($this->oldAccessList['users'])) return;
400+
$oldUsers = $this->oldAccessList['users'];
401+
402+
if($oldUsers==null) return;
400403

401404
// file can be shared using GroupFolders, including ACL check
402405
if ($this->config->getSystemValueBool('activity_use_cached_mountpoints', false)) {

0 commit comments

Comments
 (0)