Skip to content

Commit a713fb7

Browse files
authored
Merge pull request #24973 from nextcloud/backport/24964/stable19
[stable19] Don't throw a 500 when importing a broken ics reminder file
2 parents f573c4f + 6cab0e6 commit a713fb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/dav/lib/CalDAV/Reminder/ReminderService.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
use Sabre\VObject;
4141
use Sabre\VObject\Component\VAlarm;
4242
use Sabre\VObject\Component\VEvent;
43+
use Sabre\VObject\InvalidDataException;
4344
use Sabre\VObject\ParseException;
4445
use Sabre\VObject\Recur\EventIterator;
4546
use Sabre\VObject\Recur\NoInstancesException;
@@ -274,7 +275,11 @@ private function onCalendarObjectCreate(array $objectData):void {
274275
continue;
275276
}
276277

277-
$triggerTime = $valarm->getEffectiveTriggerTime();
278+
try {
279+
$triggerTime = $valarm->getEffectiveTriggerTime();
280+
} catch (InvalidDataException $e) {
281+
continue;
282+
}
278283

279284
// If effective trigger time is in the past
280285
// just skip and generate for next event

0 commit comments

Comments
 (0)