From 30ead7c46965ff1d3dd5873f348306238babe7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 6 Feb 2024 20:52:27 +0100 Subject: [PATCH] Fix error pages --- lib/page.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/page.php b/lib/page.php index f9a380a..df1a4db 100644 --- a/lib/page.php +++ b/lib/page.php @@ -99,11 +99,12 @@ function renderPage($page_name = null, $site_name = null): array else{ $page_tmp = file_get_contents($routerConfig["template_dir"] . "403.html"); $pageMetadata = parsePageTag($page_tmp); - $page = str_replace("__DEFAULT_LINK__", "/" . $routerConfig["default_site"] . "/" . $routerConfig["default_page"], $pageMetadata["output"]); + $page = $pageMetadata["output"]; http_response_code(403); } } + $page = str_replace("__DEFAULT_LINK__", "/" . $routerConfig["default_site"] . "/" . $routerConfig["default_page"], $page); if(!is_string($page)){ $page = ""; }