Skip to content

Commit

Permalink
Merge pull request #25 from barryvdh/patch-4
Browse files Browse the repository at this point in the history
Check urlStoreId as integer
  • Loading branch information
hnsr authored Jan 15, 2024
2 parents 6f3ab7c + 2bdc5de commit be5cd43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Model/AppResponseRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ protected function _isUrlInternal($url) // phpcs:ignore
// Determine if URL is within current store
if ($url !== null && strpos($url, 'http') !== false) {
$urlStoreId = $this->storeResolver->getStoreForUrl($url);
$curStoreId = (int) $this->_storeManager->getStore()->getId();
if ($urlStoreId !== false) {
$curStoreId = (int) $this->_storeManager->getStore()->getId();

return $urlStoreId === $curStoreId;
return (int) $urlStoreId === $curStoreId;
}
}

return false;
Expand Down

0 comments on commit be5cd43

Please sign in to comment.