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

Fix max instances exception in get vevent call
This commit is contained in:
Simon L 2023-04-17 15:26:11 +02:00 committed by GitHub
commit bdb09abd1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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