From 9d127347934ca46b87d3f1640e61e70cfdaeb4ad Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Fri, 6 Dec 2019 18:17:18 +0800 Subject: [PATCH] HTTP_REFERER will usually be unset for caldav requests, prevent "Undefined index" warnings --- htdocs/always.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/always.php b/htdocs/always.php index ca75b8c2..cd223e7d 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -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']);