Skip to content

Commit

Permalink
Url: Do not trim leading slahes in method setPath()
Browse files Browse the repository at this point in the history
We're handling external urls specifically now.
  • Loading branch information
Johannes Meyer committed Sep 30, 2015
1 parent 16cdd76 commit bd206e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Icinga/Web/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static function fromRequest($params = array(), $request = null)
}

$url = new Url();
$url->setPath($request->getPathInfo());
$url->setPath(ltrim($request->getPathInfo(), '/'));

// $urlParams = UrlParams::fromQueryString($request->getQuery());
if (isset($_SERVER['QUERY_STRING'])) {
Expand Down Expand Up @@ -240,7 +240,7 @@ public function getBaseUrl()
*/
public function setPath($path)
{
$this->path = ltrim($path, '/');
$this->path = $path;
return $this;
}

Expand Down

0 comments on commit bd206e3

Please sign in to comment.