Merge pull request #42406 from nextcloud/fix/dav/calendar-notification-less-than-minute-title

fix(dav): Hide less than minute diff in calendar notification title
pull/42381/head
Anna 5 months ago committed by GitHub
commit 81b874b2b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save