.../Core/EventSubscriber/RouteNormalizerRequestSubscriber.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/lib/Drupal/Core/EventSubscriber/RouteNormalizerRequestSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RouteNormalizerRequestSubscriber.php index e33a3a7d28..0f8e2404ba 100644 --- a/core/lib/Drupal/Core/EventSubscriber/RouteNormalizerRequestSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/RouteNormalizerRequestSubscriber.php @@ -5,8 +5,8 @@ use Drupal\Core\Path\PathMatcherInterface; use Drupal\Core\Routing\RequestHelper; use Drupal\Core\Routing\UrlGeneratorInterface; +use Symfony\Component\HttpKernel\Event\RequestEvent; use Symfony\Component\HttpKernel\KernelEvents; -use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -96,14 +96,14 @@ public function onKernelRequestRedirect(GetResponseEvent $event) { /** * Detects if a redirect can be performed during the current request. * - * @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event - * The Event to process. + * @param \Symfony\Component\HttpKernel\Event\RequestEvent $event + * The request event. * * @return bool */ - protected function shouldRedirect(GetResponseEvent $event) { + protected function shouldRedirect(RequestEvent $event) { return $this->routeNormalizerEnabled - && $event->isMasterRequest() + && $event->isMainRequest() && ($request = $event->getRequest()) && $request->isMethod('GET') && !$request->query->has('destination')