Skip to content

Commit

Permalink
Fix undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-kl1 authored May 23, 2024
1 parent 81d1d62 commit 0b629d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin/App/Request/StorePathInfoValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ public function __construct(
public function beforeGetValidStoreCode(Subject $subject, Http $request, string $pathInfo = ''): array
{
if (++$this->stack === 1 && $this->config->isBaseUrlResolverEnabled()) {
$storeCode = $this->resolveStoreCode($pathInfo);
$storeCode = $this->resolveStoreCode($request, $pathInfo);
$pathInfo = $storeCode === '' ? $pathInfo : $storeCode;
}
$this->stack--;

return [$request, $pathInfo];
}

private function resolveStoreCode(string $pathInfo): string
private function resolveStoreCode(Http $request, string $pathInfo): string
{
$uri = strtok($request->getUriString(), '?') . '/';
if ($uri !== false) {
Expand Down

0 comments on commit 0b629d3

Please sign in to comment.