From 6a3619aaadbb4c333e16ac940e4d32ba6836b43d Mon Sep 17 00:00:00 2001 From: Jamie McClymont Date: Thu, 10 Jan 2019 16:51:40 +1300 Subject: [PATCH] Swallow errors when updating instance ranges on TZ changes --- inc/instance_range.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/instance_range.php b/inc/instance_range.php index c1cdee17..a2ea3565 100644 --- a/inc/instance_range.php +++ b/inc/instance_range.php @@ -26,7 +26,12 @@ function update_instance_ranges(string $collection_dav_name) { ); while( $row = $qry->Fetch() ) { - $range = getVCalendarRange(new vCalendar($row->caldav_data), $row->timezone); + try { + $range = getVCalendarRange(new vCalendar($row->caldav_data), $row->timezone); + } catch (Exception $e) { + dbg_error_log('instance_range','Error parsing calendar item, skipping update'); + continue; + } $new_start = isset($range->from) ? $range->from->UTC() : null; $new_end = isset($range->until) ? $range->until->UTC() : null;