From: jld3103 Date: Wed, 20 Dec 2023 17:29:57 +0000 (+0100) Subject: fix(dav): Hide less than minute diff in calendar notification title X-Git-Tag: v29.0.0beta1~607^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F42406%2Fhead;p=nextcloud-server.git fix(dav): Hide less than minute diff in calendar notification title Signed-off-by: jld3103 --- diff --git a/apps/dav/lib/CalDAV/Reminder/Notifier.php b/apps/dav/lib/CalDAV/Reminder/Notifier.php index 657714d0247..e8f0405f3ce 100644 --- a/apps/dav/lib/CalDAV/Reminder/Notifier.php +++ b/apps/dav/lib/CalDAV/Reminder/Notifier.php @@ -170,7 +170,7 @@ class Notifier implements INotifier { $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);