From 4da91f56e40a10894a60760b56b11cfb68c4a494 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Wed, 20 Dec 2023 18:29:57 +0100 Subject: [PATCH] fix(dav): Hide less than minute diff in calendar notification title Signed-off-by: jld3103 --- apps/dav/lib/CalDAV/Reminder/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dav/lib/CalDAV/Reminder/Notifier.php b/apps/dav/lib/CalDAV/Reminder/Notifier.php index 657714d0247a1..e8f0405f3ce35 100644 --- a/apps/dav/lib/CalDAV/Reminder/Notifier.php +++ b/apps/dav/lib/CalDAV/Reminder/Notifier.php @@ -170,7 +170,7 @@ private function prepareNotificationSubject(INotification $notification): void { $components[] = $this->l10n->n('%n minute', '%n minutes', $diff->i); } - if (!$this->hasPhpDatetimeDiffBug()) { + if (count($components) > 0 && !$this->hasPhpDatetimeDiffBug()) { // Limiting to the first three components to prevent // the string from getting too long $firstThreeComponents = array_slice($components, 0, 2);