From 082934b8e33b6d6654dc8d7ad585b3c6b892793d Mon Sep 17 00:00:00 2001 From: Stricted Date: Wed, 20 Jul 2016 09:31:28 +0200 Subject: [PATCH] fix double slash in url --- lib/system/RequestHandler.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/system/RequestHandler.class.php b/lib/system/RequestHandler.class.php index 98e3fa2..13c2901 100644 --- a/lib/system/RequestHandler.class.php +++ b/lib/system/RequestHandler.class.php @@ -150,7 +150,8 @@ class RequestHandler extends SingletonFactory { $protocol = 'https://'; } - return $protocol . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/'; + $dirname = dirname($_SERVER['PHP_SELF']); + return $protocol . $_SERVER['HTTP_HOST'] . ($dirname == '/' ? $dirname : $dirname . '/'); } public function getLink (array $params = [], $query = '') { -- 2.20.1