Mercurial > hg > isophonics-drupal-site
comparison core/modules/user/src/Plugin/LanguageNegotiation/LanguageNegotiationUserAdmin.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
125 // object yet (it is still being built), so use the router to look up | 125 // object yet (it is still being built), so use the router to look up |
126 // based on the path. | 126 // based on the path. |
127 $route_match = $this->stackedRouteMatch->getRouteMatchFromRequest($request); | 127 $route_match = $this->stackedRouteMatch->getRouteMatchFromRequest($request); |
128 if ($route_match && !$route_object = $route_match->getRouteObject()) { | 128 if ($route_match && !$route_object = $route_match->getRouteObject()) { |
129 try { | 129 try { |
130 // Some inbound path processors make changes to the request. Make a | |
131 // copy as we're not actually routing the request so we do not want to | |
132 // make changes. | |
133 $cloned_request = clone $request; | |
130 // Process the path as an inbound path. This will remove any language | 134 // Process the path as an inbound path. This will remove any language |
131 // prefixes and other path components that inbound processing would | 135 // prefixes and other path components that inbound processing would |
132 // clear out, so we can attempt to load the route clearly. | 136 // clear out, so we can attempt to load the route clearly. |
133 $path = $this->pathProcessorManager->processInbound(urldecode(rtrim($request->getPathInfo(), '/')), $request); | 137 $path = $this->pathProcessorManager->processInbound(urldecode(rtrim($cloned_request->getPathInfo(), '/')), $cloned_request); |
134 $attributes = $this->router->match($path); | 138 $attributes = $this->router->match($path); |
135 } | 139 } |
136 catch (ResourceNotFoundException $e) { | 140 catch (ResourceNotFoundException $e) { |
137 return FALSE; | 141 return FALSE; |
138 } | 142 } |