Skip to content

Commit 5eb94c3

Browse files
authored
Fix memory leak : unexpected loop
1 parent 356c51b commit 5eb94c3

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
@@ -34,9 +34,10 @@ public function beforeGetValidStoreCode(Subject $subject, Http $request, string
3434
if ($uri !== false) {
3535
if ($pathInfo === '') {
3636
$pathInfo = parse_url($uri, PHP_URL_PATH);
37-
if ($pathInfo !== false) {
38-
$pathInfo = strtok($pathInfo, '/');
37+
if ($pathInfo === false) {
38+
return [$request, $pathInfo];
3939
}
40+
$pathInfo = strtok($pathInfo, '/');
4041
}
4142
$pathInfo = $pathInfo === false ? $this->resolveByWebUrl($uri) : $this->resolveByLinkUrl($uri);
4243
}

0 commit comments

Comments
 (0)