diff options
author | Simon L <szaimen@e.mail.de> | 2023-04-17 15:26:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 15:26:11 +0200 |
commit | bdb09abd1a363ae89c730ebb4837e4294aeb8dc5 (patch) | |
tree | 179fd2a7c8e4227bdf79f93af17313b006a89aaf /apps/dav | |
parent | b21c5c86e5908274e67fc31178e0dff24eed1136 (diff) | |
parent | e82371838316ef9235eb822082ef19187fad4d1d (diff) | |
download | nextcloud-server-bdb09abd1a363ae89c730ebb4837e4294aeb8dc5.tar.gz nextcloud-server-bdb09abd1a363ae89c730ebb4837e4294aeb8dc5.zip |
Merge pull request #36845 from Murena-SAS/reminder-iterator-exception
Fix max instances exception in get vevent call
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/ReminderService.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php index a2daa3cc98e..bca154a48e8 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -147,7 +147,14 @@ class ReminderService { continue; } - $vevent = $this->getVEventByRecurrenceId($vcalendar, $reminder['recurrence_id'], $reminder['is_recurrence_exception']); + try { + $vevent = $this->getVEventByRecurrenceId($vcalendar, $reminder['recurrence_id'], $reminder['is_recurrence_exception']); + } catch (MaxInstancesExceededException $e) { + $this->logger->debug('Recurrence with too many instances detected, skipping VEVENT', ['exception' => $e]); + $this->backend->removeReminder($reminder['id']); + continue; + } + if (!$vevent) { $this->logger->debug('Reminder {id} does not belong to a valid event', [ 'id' => $reminder['id'], |