Skip to content

Commit

Permalink
IBX-5821: Fixed an issue where incomplete request object was passed o…
Browse files Browse the repository at this point in the history
…ver to route Matcher
  • Loading branch information
Steveb-p committed Jan 10, 2024
1 parent d6c4b5d commit b204bf4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/bundle/Core/Routing/DefaultRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ public function setSiteAccessRouter(SiteAccessRouterInterface $siteAccessRouter)

public function matchRequest(Request $request)
{
$siteAccessRequest = $request->duplicate();
$siteAccessRequest->server->set(
'REQUEST_URI',
$request->attributes->get('semanticPathinfo', $request->getPathInfo())
);
if ($request->attributes->has('semanticPathinfo')) {
$request = $request->duplicate();
$request->server->set(
'REQUEST_URI',
$request->attributes->get('semanticPathinfo')
);
}

return parent::matchRequest($siteAccessRequest);
return parent::matchRequest($request);
}

public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
Expand Down

0 comments on commit b204bf4

Please sign in to comment.