Skip to content

Commit

Permalink
Bypass resolver if uri is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 authored Apr 2, 2024
1 parent cc420bc commit 5109b3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Plugin/App/Request/StorePathInfoValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ public function beforeGetValidStoreCode(Subject $subject, Http $request, string
$uri = explode('?', $request->getUriString())[0] . '/';
if ($pathInfo === '') {
$pathInfo = parse_url($uri, PHP_URL_PATH);
if ($pathInfo !== false) {
$pathInfo = strtok($pathInfo, '/');
if ($pathInfo === false) {
return [$request, $pathInfo];
}
$pathInfo = strtok($pathInfo, '/');
}
$pathInfo = $pathInfo === false ? $this->resolveByWebUrl($uri) : $this->resolveByLinkUrl($uri, $pathInfo);
}
Expand Down

0 comments on commit 5109b3f

Please sign in to comment.