From 0c49410012a2edc0fc2249bf94fe970db40e563f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Fri, 2 Feb 2024 15:55:23 +0100 Subject: [PATCH] fix --- lib/router.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/router.php b/lib/router.php index c408e96..97d49ea 100644 --- a/lib/router.php +++ b/lib/router.php @@ -17,10 +17,11 @@ function initRouter(): bool $routerRequest["tld"] = basename($routerRequest["requestAddress"][1]); } - $routerRequest["subdomain"] = basename($routerRequest["requestAddress"][0]); - $routerRequest["domain"] = basename($routerRequest["requestAddress"][1]); - $routerRequest["tld"] = basename($routerRequest["requestAddress"][2]); - + else { + $routerRequest["subdomain"] = basename($routerRequest["requestAddress"][0]); + $routerRequest["domain"] = basename($routerRequest["requestAddress"][1]); + $routerRequest["tld"] = basename($routerRequest["requestAddress"][2]); + } $routerRequest["page_name"] = basename($_SERVER["QUERY_STRING"]); if (empty($routerRequest["page_name"])) {