Error for appointments using a timezone
I upgraded to version 1.1.8-1 on Debian and all of my calendars stopped syncing. I also could not create any new appointments nor acknowledge any existing ones. This occurred using both Lightning and iOS. All of my appointments have a timezone associated with them and I noticed this error in the logfile:
PHP Catchable fatal error: Argument 2 passed to getVCalendarRange() must be an instance of string, string given, called in /usr/share/davical/inc/caldav-PUT-functions.php on line 1603 and defined in /usr/share/davical/inc/RRule.php on line 1510
It seems that getComponentRange and getVCalendarRange are passed some sort of timezone object rather than a string. So I modified RRule.php using the patch below and everything seems to be working well again now. I'm not sure if this is the correct solution but I thought I would share it for you to look at.
--- RRule.php.orig 2019-01-31 03:52:46.000000000 +0800
+++ RRule.php 2019-02-13 11:53:19.201894198 +0800
@@ -1452,7 +1452,7 @@
* @throws Exception (1) When DTSTART is not present but the RFC says MUST and (2) when we get an unsupported component
* @return RepeatRuleDateRange
*/
-function getComponentRange(vComponent $comp, string $fallback_tzid = null) {
+function getComponentRange(vComponent $comp, $fallback_tzid = null) {
$dtstart_prop = $comp->GetProperty('DTSTART');
$duration_prop = $comp->GetProperty('DURATION');
if ( isset($duration_prop) ) {
@@ -1507,7 +1507,7 @@
* @param object $vResource A vComponent which is a VCALENDAR containing components needing expansion
* @return RepeatRuleDateRange Representing the range of time covered by the event.
*/
-function getVCalendarRange( $vResource, string $fallback_tzid = null ) {
+function getVCalendarRange( $vResource, $fallback_tzid = null ) {
$components = $vResource->GetComponents();
$dtstart = null;