No more deprecation messages in error log

This commit is contained in:
Thomas Müller 2015-12-29 17:31:28 +01:00
parent f57e77fe05
commit 9e39e8f1c7
1 changed files with 5 additions and 1 deletions

View File

@ -328,7 +328,11 @@ class Router implements IRouter {
public function generate($name, $parameters = array(), $absolute = false) {
$this->loadRoutes();
try {
return $this->getGenerator()->generate($name, $parameters, $absolute);
$referenceType = UrlGenerator::ABSOLUTE_URL;
if ($absolute === false) {
$referenceType = UrlGenerator::ABSOLUTE_PATH;
}
return $this->getGenerator()->generate($name, $parameters, $referenceType);
} catch (RouteNotFoundException $e) {
$this->logger->logException($e);
return '';