From 118269b607bd957fa27d0296823d7e435e6900b9 Mon Sep 17 00:00:00 2001
From: Virsacer <virsacer@online.de>
Date: Sat, 10 Dec 2022 21:02:49 +0100
Subject: [PATCH] PHP 8.1 compatibility (fixes multiple deprecation messages
 and broken images)

---
 wwwroot/inc/caching.php       | 6 +++---
 wwwroot/inc/functions.php     | 6 +++---
 wwwroot/inc/interface-lib.php | 4 ++--
 wwwroot/inc/popup.php         | 2 +-
 wwwroot/inc/solutions.php     | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

Index: wwwroot/inc/solutions.php
--- wwwroot/inc/solutions.php.orig
+++ wwwroot/inc/solutions.php
@@ -472,7 +472,7 @@ function proxyStaticURI ($URI)
 	if
 	(
 		! preg_match (RE_STATIC_URI, $URI, $matches) ||
-		! array_key_exists (strtolower ($matches[1]), $content_type)
+		! array_key_exists (strtolower ($matches[1] ?? ""), $content_type)
 	)
 		printStatic404();
 	global $local_staticdir, $racktables_staticdir;
