[BUGFIX] Fixed missing / in beginning of url in getRoute when route does not exist.

This commit is contained in:
Simon Sessingø
2015-10-22 00:17:49 +02:00
parent 5d643d842a
commit bdb5b2dead
+2 -2
View File
@@ -210,7 +210,7 @@ class RouterBase {
protected function processUrl($route, $method = null, $parameters = null, $getParams = null) { protected function processUrl($route, $method = null, $parameters = null, $getParams = null) {
$url = $route->getUrl(); $url = '/' . trim($route->getUrl(), '/');
if(($route instanceof RouterController || $route instanceof RouterResource) && $method !== null) { if(($route instanceof RouterController || $route instanceof RouterResource) && $method !== null) {
$url .= $method; $url .= $method;
@@ -306,7 +306,7 @@ class RouterBase {
ArrayUtil::append($url, $parameters); ArrayUtil::append($url, $parameters);
} }
return join('/', $url); return '/' . join('/', $url);
} }
public static function getInstance() { public static function getInstance() {