From c7516b88a315d1ff9b18a6da9ebe10d5bdc8393d Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 22 Jul 2026 20:10:13 +0200 Subject: [PATCH] fix(files): do not publish incompletely built activity events When building the activity event threw \InvalidArgumentException, the error was logged but execution fell through, so the partially initialized event was still stored in the stream, queued for email and pushed as a notification. Return after logging instead. Signed-off-by: Frank Karlitschek Co-Authored-By: Claude Fable 5 --- lib/FilesHooks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index 84d7ca8ee..9d0d95cca 100644 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -1213,6 +1213,8 @@ protected function addNotificationsForUser($user, $subject, $subjectParams, $fil 'exception' => $e, ], ); + // Do not publish the incompletely built event + return; } // Add activity to stream