From ee3f3135b8c0d38659a9c50cbd27e296dd41b20b Mon Sep 17 00:00:00 2001 From: Jan Schuppik Date: Thu, 14 Aug 2025 10:46:39 +0200 Subject: [PATCH] Fix: PHP built-in server detection for PHP 8.3 SERVER_SOFTWARE format --- library/Icinga/Application/webrouter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Application/webrouter.php b/library/Icinga/Application/webrouter.php index 8bcc9124b..04c75515f 100644 --- a/library/Icinga/Application/webrouter.php +++ b/library/Icinga/Application/webrouter.php @@ -18,7 +18,7 @@ if (isset($_SERVER['REQUEST_URI'])) { // Workaround, PHPs internal Webserver seems to mess up SCRIPT_FILENAME // as it prefixes it's absolute path with DOCUMENT_ROOT -if (preg_match('/^PHP .* Development Server/', $_SERVER['SERVER_SOFTWARE'])) { +if (preg_match('/^PHP.*Development Server/', $_SERVER['SERVER_SOFTWARE'])) { $script = basename($_SERVER['SCRIPT_FILENAME']); $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = '/' . $script; $_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT']