]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(dav): Hide less than minute diff in calendar notification title 42406/head
authorjld3103 <jld3103yt@gmail.com>
Wed, 20 Dec 2023 17:29:57 +0000 (18:29 +0100)
committerjld3103 <jld3103yt@gmail.com>
Wed, 20 Dec 2023 17:29:57 +0000 (18:29 +0100)
Signed-off-by: jld3103 <jld3103yt@gmail.com>
apps/dav/lib/CalDAV/Reminder/Notifier.php

index 657714d0247a1ff3de23224746438fb0fd7d610d..e8f0405f3ce352dbac6147dce6252601e9a67f3c 100644 (file)
@@ -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);