From a32d1f2ac28063eb9e81da89134b0dced9bbf301 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 14 May 2012 23:26:30 +1200 Subject: [PATCH] Avoid unassigned variable warning. --- inc/DAVResource.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 641d1d86..c36edf83 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -271,7 +271,7 @@ class DAVResource else { $this->resourcetypes = ''; if ( isset($this->resource->caldav_data) ) { - $this->resource->displayname = $this->resource->summary; + if ( isset($this->resource->summary) )$this->resource->displayname = $this->resource->summary; if ( strtoupper(substr($this->resource->caldav_data,0,15)) == 'BEGIN:VCALENDAR' ) { $this->contenttype = 'text/calendar'; if ( !$this->HavePrivilegeTo('read') && $this->HavePrivilegeTo('read-free-busy') ) { @@ -292,6 +292,7 @@ class DAVResource $comp->ClearComponents('VALARM'); $vcal2->AddComponent($comp); } + $this->resource->displayname = $this->resource->summary = $vcal2->GetPValue('SUMMARY'); $this->resource->caldav_data = $vcal2->Render(); } }