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

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-01-05 10:08:14 +01:00 committed by backportbot[bot]
parent f9a5ac3638
commit dc036c6064

View file

@ -39,6 +39,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;
@ -273,7 +274,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