From ff1041efced34cdf6f83d1e1f9238a5a731706c3 Mon Sep 17 00:00:00 2001 From: Brian Msyamboza <42282752+brian169@users.noreply.github.com> Date: Mon, 25 Apr 2022 14:24:35 +0200 Subject: [PATCH] check if URL has params to prevent no params error (#44) --- core/templates.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/templates.php b/core/templates.php index b19a7cc..158001a 100644 --- a/core/templates.php +++ b/core/templates.php @@ -51,7 +51,7 @@ $protocol = $_SERVER['SERVER_PROTOCOL']; $domain = $_SERVER['HTTP_HOST']; $script = $_SERVER['SCRIPT_NAME']; - $parameters = $_SERVER['QUERY_STRING']; + $parameters = $GET ? $_SERVER['QUERY_STRING'] : "" ; $protocol=strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https'; $currenturl = $protocol . '://' . $domain. $script . '?' . $parameters;