Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(dav): Hide less than minute diff in calendar notification title
Signed-off-by: jld3103 <[email protected]>
  • Loading branch information
provokateurin authored and backportbot-nextcloud[bot] committed Dec 20, 2023
commit 4da91f56e40a10894a60760b56b11cfb68c4a494
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Reminder/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down