Skip to content

Commit

Permalink
Check urlStoreId as integer
Browse files Browse the repository at this point in the history
Fixes types for urlStoreId. Fixes #19
  • Loading branch information
barryvdh authored Jan 4, 2024
1 parent 6f3ab7c commit 2bdc5de
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 2bdc5de

Please sign in to comment.