Skip to content

Commit

Permalink
Fix memory leak : unexpected loop
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 authored May 13, 2024
1 parent 356c51b commit 5eb94c3
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 @@ -34,9 +34,10 @@ public function beforeGetValidStoreCode(Subject $subject, Http $request, string
if ($uri !== false) {
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);
}
Expand Down

0 comments on commit 5eb94c3

Please sign in to comment.