Skip to content

Commit

Permalink
Merge pull request #36845 from Murena-SAS/reminder-iterator-exception
Browse files Browse the repository at this point in the history
Fix max instances exception in get vevent call
  • Loading branch information
szaimen authored Apr 17, 2023
2 parents b21c5c8 + e823718 commit bdb09ab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/dav/lib/CalDAV/Reminder/ReminderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,14 @@ public function processReminders() :void {
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'],
Expand Down

0 comments on commit bdb09ab

Please sign in to comment.