From f69150bdfa9dcf55f39852292779edd75cc1c8aa Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 4 Jun 2025 12:33:59 +0200 Subject: [PATCH] fix(FilesHooks): Catch all exceptions when looking up unrelated users This will catch "Undefined array key" exceptions from above `$cachedPath[$userId]`. Fix: https://github.com/nextcloud/groupfolders/issues/3680 Signed-off-by: Louis Chemineau --- lib/FilesHooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index fe099e52d..40194fdad 100755 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -1355,7 +1355,7 @@ private function getUnrelatedUsers(int $fileId, array $cachedMounts): array { if ($node->isReadable()) { continue; // overkill ? as rootFolder->get() would throw an exception if file is not available } - } catch (\Exception $e) { + } catch (\Throwable $e) { } $filteredUsers[] = $userId;