Merge pull request #36845 from Murena-SAS/reminder-iterator-exception

Fix max instances exception in get vevent call
pull/35744/head
Simon L 2023-04-17 15:26:11 +07:00 committed by GitHub
commit bdb09abd1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

@ -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'],