mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-15 12:34:57 +01:00
fix for Call to a member function setTimezone() on a non-object; Dont Try to do a settimezone, when rrule[UNTIL] is no DateTime object
This commit is contained in:
parent
4d15d698b1
commit
c94bf30cb8
@ -611,8 +611,14 @@ class calendar_ical extends calendar_boupdate
|
||||
{
|
||||
self::$tz_cache['UTC'] = calendar_timezones::DateTimeZone('UTC');
|
||||
}
|
||||
$rrule['UNTIL']->setTimezone(self::$tz_cache['UTC']);
|
||||
$rrule['UNTIL'] = $rrule['UNTIL']->format('Ymd\THis\Z');
|
||||
//error_log(__METHOD__.array2string($rrule));
|
||||
//error_log(__METHOD__.array2string(self::$tz_cache['UTC']));
|
||||
if (is_a($rrule['UNTIL'],'DateTime'))
|
||||
{
|
||||
$rrule['UNTIL']->setTimezone(self::$tz_cache['UTC']);
|
||||
$rrule['UNTIL'] = $rrule['UNTIL']->format('Ymd\THis\Z');
|
||||
}
|
||||
//error_log(__METHOD__.array2string($rrule));
|
||||
}
|
||||
}
|
||||
if ($version == '1.0')
|
||||
@ -3105,4 +3111,4 @@ class calendar_ical extends calendar_boupdate
|
||||
|
||||
return $vcal->exportvCalendar($charset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user