Skip to content

Commit 846f605

Browse files
author
Vasilii Burlacu
committed
Change checking of StoreInterface instead of Store in RouteParamsResolver.php
1 parent 7e3c3fc commit 846f605

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Store/Url/Plugin/RouteParamsResolver.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Store\Url\Plugin;
77

88
use \Magento\Store\Model\Store;
9+
use \Magento\Store\Api\Data\StoreInterface;
910
use \Magento\Store\Model\ScopeInterface as StoreScopeInterface;
1011

1112
/**
@@ -65,9 +66,9 @@ public function beforeSetRouteParams(
6566
unset($data['_scope']);
6667
}
6768
if (isset($data['_scope_to_url']) && (bool)$data['_scope_to_url'] === true) {
68-
/** @var Store $currentScope */
69+
/** @var StoreInterface $currentScope */
6970
$currentScope = $subject->getScope();
70-
$storeCode = $currentScope && $currentScope instanceof Store ?
71+
$storeCode = $currentScope && $currentScope instanceof StoreInterface ?
7172
$currentScope->getCode() :
7273
$this->storeManager->getStore()->getCode();
7374

0 commit comments

Comments
 (0)