Merge pull request #2728 from xini/2.4

BUGFIX: URL '/' ending up beeing redirected to '//'
This commit is contained in:
Ingo Schommer 2013-12-19 11:02:45 -08:00
commit d0c37b3a13

View File

@ -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()) {