More fixes for PHP 8.1

This commit is contained in:
Andrew Ruthven 2022-02-12 23:59:26 +13:00
parent 5d56f6b5ea
commit f1a4dcee0c
2 changed files with 4 additions and 2 deletions

View File

@ -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']);
}

View File

@ -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() );