No more deprecation messages in error log
This commit is contained in:
parent
f57e77fe05
commit
9e39e8f1c7
|
@ -328,7 +328,11 @@ class Router implements IRouter {
|
||||||
public function generate($name, $parameters = array(), $absolute = false) {
|
public function generate($name, $parameters = array(), $absolute = false) {
|
||||||
$this->loadRoutes();
|
$this->loadRoutes();
|
||||||
try {
|
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) {
|
} catch (RouteNotFoundException $e) {
|
||||||
$this->logger->logException($e);
|
$this->logger->logException($e);
|
||||||
return '';
|
return '';
|
||||||
|
|
Loading…
Reference in New Issue