[Routing] generate(null) should throw an exception
This commit is contained in:
parent
913781baac
commit
710aafbc91
@ -113,7 +113,7 @@ EOF;
|
|||||||
?? $this->context->getParameter('_locale')
|
?? $this->context->getParameter('_locale')
|
||||||
?: $this->defaultLocale;
|
?: $this->defaultLocale;
|
||||||
|
|
||||||
if (null !== $locale && (self::$declaredRoutes[$name.'.'.$locale][1]['_canonical_route'] ?? null) === $name) {
|
if (null !== $locale && (self::$declaredRoutes[$name.'.'.$locale][1]['_canonical_route'] ?? null) === $name && null !== $name) {
|
||||||
unset($parameters['_locale']);
|
unset($parameters['_locale']);
|
||||||
$name .= '.'.$locale;
|
$name .= '.'.$locale;
|
||||||
} elseif (!isset(self::$declaredRoutes[$name])) {
|
} elseif (!isset(self::$declaredRoutes[$name])) {
|
||||||
|
Reference in New Issue
Block a user