HTTP_REFERER will usually be unset for caldav requests, prevent "Undefined index" warnings

This commit is contained in:
Florian Schlichting 2019-12-06 18:17:18 +08:00
parent fb7ecc5282
commit 9d12734793

View File

@ -45,7 +45,7 @@ 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']);
$_SERVER['HTTP_REFERER'] = htmlspecialchars(@$_SERVER['HTTP_REFERER']);