Commit 9e39e8f1 authored by Thomas Müller's avatar Thomas Müller
Browse files

No more deprecation messages in error log

parent f57e77fe
......@@ -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 '';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment