Merge pull request #24973 from nextcloud/backport/24964/stable19
[stable19] Don't throw a 500 when importing a broken ics reminder file
This commit is contained in:
commit
a713fb71a1
|
@ -40,6 +40,7 @@ use OCP\IUserManager;
|
||||||
use Sabre\VObject;
|
use Sabre\VObject;
|
||||||
use Sabre\VObject\Component\VAlarm;
|
use Sabre\VObject\Component\VAlarm;
|
||||||
use Sabre\VObject\Component\VEvent;
|
use Sabre\VObject\Component\VEvent;
|
||||||
|
use Sabre\VObject\InvalidDataException;
|
||||||
use Sabre\VObject\ParseException;
|
use Sabre\VObject\ParseException;
|
||||||
use Sabre\VObject\Recur\EventIterator;
|
use Sabre\VObject\Recur\EventIterator;
|
||||||
use Sabre\VObject\Recur\NoInstancesException;
|
use Sabre\VObject\Recur\NoInstancesException;
|
||||||
|
@ -274,7 +275,11 @@ class ReminderService {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$triggerTime = $valarm->getEffectiveTriggerTime();
|
$triggerTime = $valarm->getEffectiveTriggerTime();
|
||||||
|
} catch (InvalidDataException $e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// If effective trigger time is in the past
|
// If effective trigger time is in the past
|
||||||
// just skip and generate for next event
|
// just skip and generate for next event
|
||||||
|
|
Loading…
Reference in New Issue