Added important 418 teapot error

This commit is contained in:
2022-06-01 12:37:09 +02:00
parent ce3aa574ea
commit 8b49b26f24
2 changed files with 3 additions and 2 deletions

View File

@@ -60,8 +60,8 @@ if ($installation) {
}
if ($router !== null) {
if (!isset($_GET["site"]) && isset($_GET["error"]) &&
is_string($_GET["error"]) && preg_match("^\d+$", $_GET["error"])) {
if ((!isset($_GET["site"]) || $_GET["site"] === "/") && isset($_GET["error"]) &&
is_string($_GET["error"]) && preg_match("/^\d+$/", $_GET["error"])) {
$response = $router->returnStatusCode(intval($_GET["error"]));
} else {
$response = $router->run($requestedUri);