Swallow errors when updating instance ranges on TZ changes

This commit is contained in:
Jamie McClymont 2019-01-10 16:51:40 +13:00
parent fe443bf2e6
commit 6a3619aaad

View File

@ -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;