From a88de5aae54b5fa6ae84c8941be9c306a6156d1a Mon Sep 17 00:00:00 2001 From: Juraj Date: Wed, 10 Jan 2018 15:04:07 +0100 Subject: [PATCH] More PHP notices --- src/CalDAVClient.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/CalDAVClient.php b/src/CalDAVClient.php index f69879d..079ee08 100644 --- a/src/CalDAVClient.php +++ b/src/CalDAVClient.php @@ -758,16 +758,18 @@ function FindCalendars( $recursed=false ) { if ( !isset($this->calendar_home_set[0]) ) { $this->FindCalendarHome($recursed); } - $properties = - array( - 'resourcetype', - 'displayname', - 'http://calendarserver.org/ns/:getctag', - 'http://apple.com/ns/ical/:calendar-color', - 'http://apple.com/ns/ical/:calendar-order', - ); - $this->DoPROPFINDRequest( $this->first_url_part.$this->calendar_home_set[0], $properties, 1); - + else { + $properties = + array( + 'resourcetype', + 'displayname', + 'http://calendarserver.org/ns/:getctag', + 'http://apple.com/ns/ical/:calendar-color', + 'http://apple.com/ns/ical/:calendar-order', + ); + $this->DoPROPFINDRequest( $this->first_url_part.$this->calendar_home_set[0], $properties, 1); + } + return $this->parse_calendar_info(); }