diff --git a/inc/always.php.in b/inc/always.php.in index 28c08bdd..74a0d631 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -45,7 +45,9 @@ function clean_get() { if(isset($_POST)) array_walk($_POST, 'filter_post'); $_GET = clean_get(); $_SERVER['REQUEST_URI'] = str_replace("&", "&", htmlspecialchars($_SERVER['REQUEST_URI'])); -$_SERVER['HTTP_REFERER'] = htmlspecialchars(@$_SERVER['HTTP_REFERER']); +if (isset($_SERVER['HTTP_REFERER'])) { + $_SERVER['HTTP_REFERER'] = htmlspecialchars(@$_SERVER['HTTP_REFERER']); +} diff --git a/inc/caldav-PUT-functions.php b/inc/caldav-PUT-functions.php index 1a2fb54c..e2afa3a9 100644 --- a/inc/caldav-PUT-functions.php +++ b/inc/caldav-PUT-functions.php @@ -1434,7 +1434,7 @@ function write_resource( DAVResource $resource, $caldav_data, DAVResource $colle $duration = $first->GetPValue('DURATION'); $oldduration = $oldfirst->GetPValue('DURATION'); $organizer = $vcal->GetOrganizer(); - if (strcmp($duration, $oldduration)) $modified = true; + if (isset($duration) && isset($oldduration) && strcmp($duration, $oldduration)) $modified = true; if (($modified == true) && !($organizer === false || empty($organizer))) { dbg_error_log( 'PUT', "event time attributes have been modified, reset all attendees' PARTSTAT to NEEDS-ACTION."); $organizer_email = preg_replace( '/^mailto:/i', '', $organizer->Value() );