diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index c160a6451..3509bddfb 100755 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -416,10 +416,7 @@ protected function fileMoving($oldPath, $newPath) { $moveUsers = array_intersect($beforeUsers, $afterUsers); $this->generateMoveActivities($moveUsers, $oldUsers, $affectedUsers, $fileId, $oldFileName, $parentId, $fileName); - $beforeRemotes = []; - if (isset($this->oldAccessList['users'])) { - $beforeRemotes = $this->oldAccessList['remotes']; - } + $beforeRemotes = $this->oldAccessList['remotes'] ?? []; $afterRemotes = $accessList['remotes']; $addRemotes = $deleteRemotes = $moveRemotes = [];