aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjld3103 <jld3103yt@gmail.com>2023-12-20 18:29:57 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-12-20 21:22:55 +0000
commit4da91f56e40a10894a60760b56b11cfb68c4a494 (patch)
tree97274df822b76dc54ef83825607964dad4b13101
parent42dee2e29f0153bbb15a0d0fe1350d766ae68f18 (diff)
downloadnextcloud-server-4da91f56e40a10894a60760b56b11cfb68c4a494.tar.gz
nextcloud-server-4da91f56e40a10894a60760b56b11cfb68c4a494.zip
fix(dav): Hide less than minute diff in calendar notification title
Signed-off-by: jld3103 <jld3103yt@gmail.com>
-rw-r--r--apps/dav/lib/CalDAV/Reminder/Notifier.php2
1 files changed, 1 insertions, 1 deletions
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);