Fix error pages

This commit is contained in:
Bruno Rybársky 2024-02-06 20:52:27 +01:00
parent d5f3a1bb59
commit 30ead7c469

@ -99,11 +99,12 @@ function renderPage($page_name = null, $site_name = null): array
else{ else{
$page_tmp = file_get_contents($routerConfig["template_dir"] . "403.html"); $page_tmp = file_get_contents($routerConfig["template_dir"] . "403.html");
$pageMetadata = parsePageTag($page_tmp); $pageMetadata = parsePageTag($page_tmp);
$page = str_replace("__DEFAULT_LINK__", "/" . $routerConfig["default_site"] . "/" . $routerConfig["default_page"], $pageMetadata["output"]); $page = $pageMetadata["output"];
http_response_code(403); http_response_code(403);
} }
} }
$page = str_replace("__DEFAULT_LINK__", "/" . $routerConfig["default_site"] . "/" . $routerConfig["default_page"], $page);
if(!is_string($page)){ if(!is_string($page)){
$page = ""; $page = "";
} }