From 210b4037779326a40bb41aa3a513cbd9d6bc331d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 27 Jan 2015 22:13:04 +0000 Subject: [PATCH] If recur end date could not be parsed, handle it as missing. --- calendar/inc/class.calendar_ical.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/calendar/inc/class.calendar_ical.inc.php b/calendar/inc/class.calendar_ical.inc.php index 292c1d5243..a5352f75c6 100644 --- a/calendar/inc/class.calendar_ical.inc.php +++ b/calendar/inc/class.calendar_ical.inc.php @@ -2455,6 +2455,11 @@ class calendar_ical extends calendar_boupdate if (preg_match('/UNTIL=([0-9TZ]+)/',$recurence,$matches)) { $vcardData['recur_enddate'] = $this->vCalendar->_parseDateTime($matches[1]); + // If it couldn't be parsed, treat it as not set + if(is_string($vcardData['recur_enddate'])) + { + unset($vcardData['recur_enddate']); + } } elseif (preg_match('/COUNT=([0-9]+)/',$recurence,$matches)) {