From f0570c6ae8fbca2655bc86874f54dc2d0fd79743 Mon Sep 17 00:00:00 2001 From: Florian Thoma Date: Wed, 18 Dec 2013 13:44:30 +1100 Subject: [PATCH] BUGFIX: URL '/' ending up beeing redirected to '//' --- core/startup/ParameterConfirmationToken.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/startup/ParameterConfirmationToken.php b/core/startup/ParameterConfirmationToken.php index 288488b6b..667e03187 100644 --- a/core/startup/ParameterConfirmationToken.php +++ b/core/startup/ParameterConfirmationToken.php @@ -91,7 +91,7 @@ class ParameterConfirmationToken { unset($params['url']); // Join them all together into the original URL - $location = "$proto://" . $host . '/' . ltrim(BASE_URL, '/') . $url . ($params ? '?'.http_build_query($params) : ''); + $location = "$proto://" . $host . (strlen(trim(BASE_URL, '/')) > 0 ? '/' . trim(BASE_URL, '/') : '' ) . (strlen(trim($url, '/')) > 0 ? '/' . trim($url, '/') : '' ) . ($params ? '?'.http_build_query($params) : ''); // And redirect if (headers_sent()) {