- Fixed issue with parsing parameters on some occasion.
- Optimisations.
This commit is contained in:
Simon Sessingø
2017-11-27 02:03:12 +01:00
parent bdfc36ed5c
commit efd5159604
7 changed files with 33 additions and 26 deletions
+2 -2
View File
@@ -285,7 +285,7 @@ class Router
}
if ($routeNotAllowed === true) {
$message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUri()->getPath(), $this->request->getMethod());
$message = sprintf('Route "%s" or method "%s" not allowed.', $this->request->getUri()->getPath(), $this->request->getMethod());
$this->handleException(new HttpException($message, 403));
}
@@ -497,7 +497,7 @@ class Router
$route = $this->processedRoutes[$i];
/* Check if the route contains the name/alias */
if ($route->hasName($controller)) {
if ($route->hasName($controller) === true) {
return $route->findUrl($method, $parameters, $name) . $this->arrayToParams($getParams);
}