Skip to content

Commit

Permalink
Fix malformated uri (during build)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 authored Apr 2, 2024
1 parent 97b6917 commit cc420bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Plugin/App/Request/StorePathInfoValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ public function beforeGetValidStoreCode(Subject $subject, Http $request, string
if ($this->config->isEnabled()) {
$uri = explode('?', $request->getUriString())[0] . '/';
if ($pathInfo === '') {
$pathInfo = strtok(parse_url($uri, PHP_URL_PATH), '/');
$pathInfo = parse_url($uri, PHP_URL_PATH);
if ($pathInfo !== false) {
$pathInfo = strtok($pathInfo, '/');
}
}
$pathInfo = $pathInfo === false ? $this->resolveByWebUrl($uri) : $this->resolveByLinkUrl($uri, $pathInfo);
}
Expand Down

0 comments on commit cc420bc

Please sign in to comment.