Skip to content

Commit fa4128c

Browse files
Merge pull request #617 from nextcloud/bugfix/noid/unneeded-cloudId
Only call getCloudId if needed
2 parents c4d9ccf + bdf9743 commit fa4128c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/FilesHooks.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ protected function addNotificationsForFileAction($filePath, $activityType, $subj
229229

230230
$accessList = $this->getUserPathsFromPath($filePath, $uidOwner);
231231

232-
$this->generateRemoteActivity($accessList['remotes'], $activityType, time(), $this->currentUser->getCloudId(), $accessList['ownerPath']);
232+
if (!empty($accessList['remotes'])) {
233+
$this->generateRemoteActivity($accessList['remotes'], $activityType, time(), $this->currentUser->getCloudId(), $accessList['ownerPath']);
234+
}
233235

234236
if ($this->config->getSystemValueBool('activity_use_cached_mountpoints', false)) {
235237
$mountsForFile = $this->userMountCache->getMountsForFileId($fileId);

0 commit comments

Comments
 (0)