From 7703a86291da45df25d5ed56ba7f57185683b1a3 Mon Sep 17 00:00:00 2001 From: Andreas Neumann Date: Tue, 1 Mar 2016 16:29:26 +0100 Subject: [PATCH] [BUGFIX] UrlGenerator returns empty string instead of a single slash, if an empty $url-param is passed --- system/Url/UrlGenerator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/Url/UrlGenerator.php b/system/Url/UrlGenerator.php index 8fd737e0..ff71f57e 100644 --- a/system/Url/UrlGenerator.php +++ b/system/Url/UrlGenerator.php @@ -74,6 +74,7 @@ public function generateAbsolute($route) protected function filterUrl($url) { $url = preg_replace('/\/index$/', '', $url); - return empty($url) ? '/' : rtrim($url, '/'); + $url = rtrim($url, '/'); + return empty($url) ? '/' : $url; } }