From 4b8268b70fdc8963b016c7096b1b978bee06ee0b Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Sat, 5 Oct 2024 08:54:30 +0200 Subject: [PATCH] Pass OPTION_FORGIVING to VObject Reader --- lib/CalDAV/Plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CalDAV/Plugin.php b/lib/CalDAV/Plugin.php index ccb722f857..d5c727e727 100644 --- a/lib/CalDAV/Plugin.php +++ b/lib/CalDAV/Plugin.php @@ -793,14 +793,14 @@ protected function validateICalendar(&$data, $path, &$modified, RequestInterface // If the data starts with a [, we can reasonably assume we're dealing // with a jCal object. if ('[' === substr($data, 0, 1)) { - $vobj = VObject\Reader::readJson($data); + $vobj = VObject\Reader::readJson($data, VObject\Reader::OPTION_FORGIVING); // Converting $data back to iCalendar, as that's what we // technically support everywhere. $data = $vobj->serialize(); $modified = true; } else { - $vobj = VObject\Reader::read($data); + $vobj = VObject\Reader::read($data, VObject\Reader::OPTION_FORGIVING); } } catch (VObject\ParseException $e) { throw new DAV\Exception\UnsupportedMediaType('This resource only supports valid iCalendar 2.0 data. Parse error: '.$e->getMessage());