core/lib/Drupal/Core/RouteProcessor/RouteProcessorCurrent.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/lib/Drupal/Core/RouteProcessor/RouteProcessorCurrent.php b/core/lib/Drupal/Core/RouteProcessor/RouteProcessorCurrent.php index c9d410e..ec7c04f 100644 --- a/core/lib/Drupal/Core/RouteProcessor/RouteProcessorCurrent.php +++ b/core/lib/Drupal/Core/RouteProcessor/RouteProcessorCurrent.php @@ -36,11 +36,12 @@ public function __construct(RouteMatchInterface $route_match) { * {@inheritdoc} */ public function processOutbound(Route $route, array &$parameters) { - if (($new_route = $this->routeMatch->getRouteObject()) && $route->getPath() == '/') { - $route->setPath($new_route->getPath()); - $route->setRequirements($new_route->getRequirements()); - $route->setOptions($new_route->getOptions()); - $route->setDefaults($new_route->getDefaults()); + if (($current_route = $this->routeMatch->getRouteObject()) && $route->getPath() == '/') { + $route->setPath($current_route->getPath()); + $route->setRequirements($current_route->getRequirements()); + $route->setOptions($current_route->getOptions()); + $route->setDefaults($current_route->getDefaults()); + $parameters = $this->routeMatch->getRawParameters()->all(); } }