mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-29 18:26:05 +00:00
Fixes for warnings in PHP 8.1
This commit is contained in:
parent
9fb6be6f9c
commit
8096807c6d
@ -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']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -217,9 +217,13 @@ class CalDAVRequest
|
||||
$_SERVER['REQUEST_METHOD'] = $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'];
|
||||
}
|
||||
$this->method = $_SERVER['REQUEST_METHOD'];
|
||||
$this->content_type = (isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null);
|
||||
if ( preg_match( '{^(\S+/\S+?)\s*(;.*)?$}', $this->content_type, $matches ) ) {
|
||||
$this->content_type = $matches[1];
|
||||
if (isset($_SERVER['CONTENT_TYPE'])) {
|
||||
$this->content_type = $_SERVER['CONTENT_TYPE'];
|
||||
if ( preg_match( '{^(\S+/\S+?)\s*(;.*)?$}', $this->content_type, $matches ) ) {
|
||||
$this->content_type = $matches[1];
|
||||
}
|
||||
} else {
|
||||
$this->content_type = null;
|
||||
}
|
||||
if ( strlen($c->raw_post) > 0 ) {
|
||||
if ( $this->method == 'PROPFIND' || $this->method == 'REPORT' || $this->method == 'PROPPATCH' || $this->method == 'BIND' || $this->method == 'MKTICKET' || $this->method == 'ACL' ) {
|
||||
|
||||
@ -354,6 +354,7 @@ class RepeatRuleDateTime extends DateTime {
|
||||
}
|
||||
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function modify( $interval ) {
|
||||
// print ">>$interval<<\n";
|
||||
if ( preg_match('{^(-)?P(([0-9-]+)W)?(([0-9-]+)D)?T?(([0-9-]+)H)?(([0-9-]+)M)?(([0-9-]+)S)?$}', $interval, $matches) ) {
|
||||
@ -444,6 +445,7 @@ class RepeatRuleDateTime extends DateTime {
|
||||
}
|
||||
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function setTimeZone( $tz ) {
|
||||
if ( is_string($tz) ) {
|
||||
$tz = new RepeatRuleTimeZone($tz);
|
||||
@ -454,6 +456,7 @@ class RepeatRuleDateTime extends DateTime {
|
||||
}
|
||||
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getTimeZone() {
|
||||
return $this->tzid;
|
||||
}
|
||||
@ -482,6 +485,7 @@ class RepeatRuleDateTime extends DateTime {
|
||||
}
|
||||
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
function setDate( $year=null, $month=null, $day=null ) {
|
||||
if ( !isset($year) ) $year = parent::format('Y');
|
||||
if ( !isset($month) ) $month = parent::format('m');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user