From 8d6e7bc6aaebdee60009f569a10df8df16942960 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Sat, 12 Aug 2023 09:42:36 +0200 Subject: [PATCH] Check if users is set Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Fix psalm Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Use empty array if array is unset Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- lib/FilesHooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index 5a550988f..977f27dfb 100755 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -231,7 +231,7 @@ protected function addNotificationsForFileAction($filePath, $activityType, $subj $this->generateRemoteActivity($accessList['remotes'], $activityType, time(), $this->currentUser->getCloudId(), $accessList['ownerPath']); } - $affectedUsers = $accessList['users']; + $affectedUsers = $accessList['users'] ?? []; // file can be shared using GroupFolders, including ACL check if ($this->config->getSystemValueBool('activity_use_cached_mountpoints', false)) {