From bdf9743d2dbcec652e8843c96ce8e1592ed12858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 9 Jul 2021 08:01:04 +0200 Subject: [PATCH] Only call getCloudId if needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/FilesHooks.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index 1859e8513..db42a7660 100755 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -229,7 +229,9 @@ protected function addNotificationsForFileAction($filePath, $activityType, $subj $accessList = $this->getUserPathsFromPath($filePath, $uidOwner); - $this->generateRemoteActivity($accessList['remotes'], $activityType, time(), $this->currentUser->getCloudId(), $accessList['ownerPath']); + if (!empty($accessList['remotes'])) { + $this->generateRemoteActivity($accessList['remotes'], $activityType, time(), $this->currentUser->getCloudId(), $accessList['ownerPath']); + } if ($this->config->getSystemValueBool('activity_use_cached_mountpoints', false)) { $mountsForFile = $this->userMountCache->getMountsForFileId($fileId);