Skip to content

Commit 5109b3f

Browse files
authored
Bypass resolver if uri is invalid
1 parent cc420bc commit 5109b3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Plugin/App/Request/StorePathInfoValidator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ public function beforeGetValidStoreCode(Subject $subject, Http $request, string
3333
$uri = explode('?', $request->getUriString())[0] . '/';
3434
if ($pathInfo === '') {
3535
$pathInfo = parse_url($uri, PHP_URL_PATH);
36-
if ($pathInfo !== false) {
37-
$pathInfo = strtok($pathInfo, '/');
36+
if ($pathInfo === false) {
37+
return [$request, $pathInfo];
3838
}
39+
$pathInfo = strtok($pathInfo, '/');
3940
}
4041
$pathInfo = $pathInfo === false ? $this->resolveByWebUrl($uri) : $this->resolveByLinkUrl($uri, $pathInfo);
4142
}

0 commit comments

Comments
 (0)