diff --git a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php index c00509f..4a6ea08 100644 --- a/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php +++ b/core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php @@ -12,6 +12,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\Routing\Exception\ResourceNotFoundException; +use Symfony\Component\Routing\Matcher\RequestMatcherInterface; use Symfony\Component\Routing\Matcher\UrlMatcherInterface; /** @@ -131,7 +132,12 @@ protected function isAdminPath(Request $request) { // prefixes and other path components that inbound processing would // clear out, so we can attempt to load the route clearly. $path = $this->pathProcessorManager->processInbound(urldecode(rtrim($request->getPathInfo(), '/')), $request); - $attributes = $this->router->match($path); + if ($this->router instanceof RequestMatcherInterface) { + $attributes = $this->router->matchRequest(Request::create($path, $request->getMethod())); + } + else { + $attributes = $this->router->match($path); + } } catch (ResourceNotFoundException $e) { return FALSE;