Don't throw a 500 when importing a broken ics reminder file

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/24964/head
Joas Schilling 5 years ago
parent 8d22ba4a33
commit 9fd2b6045d
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
  1. 7
      apps/dav/lib/CalDAV/Reminder/ReminderService.php

@ -40,6 +40,7 @@ use OCP\IUserManager;
use Sabre\VObject;
use Sabre\VObject\Component\VAlarm;
use Sabre\VObject\Component\VEvent;
use Sabre\VObject\InvalidDataException;
use Sabre\VObject\ParseException;
use Sabre\VObject\Recur\EventIterator;
use Sabre\VObject\Recur\NoInstancesException;
@ -274,7 +275,11 @@ class ReminderService {
continue;
}
$triggerTime = $valarm->getEffectiveTriggerTime();
try {
$triggerTime = $valarm->getEffectiveTriggerTime();
} catch (InvalidDataException $e) {
continue;
}
// If effective trigger time is in the past
// just skip and generate for next event

Loading…
Cancel
Save