From bd206e3718fefaea674baf5d0ef4dc915730d860 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 30 Sep 2015 15:42:01 +0200 Subject: [PATCH] Url: Do not trim leading slahes in method setPath() We're handling external urls specifically now. --- library/Icinga/Web/Url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Icinga/Web/Url.php b/library/Icinga/Web/Url.php index 2c4991e71..e314aa145 100644 --- a/library/Icinga/Web/Url.php +++ b/library/Icinga/Web/Url.php @@ -75,7 +75,7 @@ class Url } $url = new Url(); - $url->setPath($request->getPathInfo()); + $url->setPath(ltrim($request->getPathInfo(), '/')); // $urlParams = UrlParams::fromQueryString($request->getQuery()); if (isset($_SERVER['QUERY_STRING'])) { @@ -240,7 +240,7 @@ class Url */ public function setPath($path) { - $this->path = ltrim($path, '/'); + $this->path = $path; return $this; }