From b3b2ccc6c01bfcefcb8cb49277ea49a681188b71 Mon Sep 17 00:00:00 2001 From: Dirk Bauer Date: Mon, 27 Jun 2022 14:58:58 +0200 Subject: [PATCH] Fixed php8 deprecation for htmlspecialchars (#fixes 266) --- htdocs/always.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/always.php b/htdocs/always.php index 984cc403..83bbfd7d 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -44,7 +44,9 @@ function clean_get() { // relies on variables that are easily manipulated by the user. These lines and functions filter all those variables. if(isset($_POST)) array_walk($_POST, 'filter_post'); $_GET = clean_get(); -$_SERVER['REQUEST_URI'] = str_replace("&", "&", htmlspecialchars($_SERVER['REQUEST_URI'])); +if (isset($_SERVER['REQUEST_URI'])) { + $_SERVER['REQUEST_URI'] = str_replace("&", "&", htmlspecialchars($_SERVER['REQUEST_URI'])); +} if (isset($_SERVER['HTTP_REFERER'])) { $_SERVER['HTTP_REFERER'] = htmlspecialchars(@$_SERVER['HTTP_REFERER']); }