From 35a5518971863587097d3ae844faddacbbdabb0a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Mon, 25 Jun 2012 08:02:08 +1200 Subject: [PATCH] Catch 'events' without a DTSTART gracefully and ignore them. --- inc/caldav-PUT-functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 9ce52190..81fbef99 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -944,6 +944,10 @@ EOSQL; * */ $dtstart_prop = $first->GetProperty('DTSTART'); + if ( empty($dtstart_prop) ) { + dbg_error_log('PUT','Invalid VEVENT without DTSTART, UID="%s" in collection %d', $uid, $collection_id); + continue; + } $value_type = $dtstart_prop->GetParameterValue('VALUE'); dbg_error_log('PUT','DTSTART without DTEND. DTSTART value type is %s', $value_type ); if ( isset($value_type) && $value_type == 'DATE' )