diff --git a/app/code/Magento/Store/Model/PathConfig.php b/app/code/Magento/Store/Model/PathConfig.php index 0d80d98c32821..d1e4830cc4f75 100644 --- a/app/code/Magento/Store/Model/PathConfig.php +++ b/app/code/Magento/Store/Model/PathConfig.php @@ -9,8 +9,10 @@ class PathConfig implements \Magento\Framework\App\Router\PathConfigInterface { /** @var \Magento\Framework\App\Config\ScopeConfigInterface */ private $scopeConfig; + /** @var \Magento\Framework\Url\SecurityInfoInterface */ private $urlSecurityInfo; + /** @var StoreManagerInterface */ private $storeManager; @@ -24,7 +26,6 @@ public function __construct( \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo, StoreManagerInterface $storeManager ) { - $this->scopeConfig = $scopeConfig; $this->urlSecurityInfo = $urlSecurityInfo; $this->storeManager = $storeManager; @@ -76,6 +77,8 @@ public function shouldBeSecure($path) */ public function getDefaultPath() { - return $this->scopeConfig->getValue('web/default/front', ScopeInterface::SCOPE_STORE); + $store = $this->storeManager->getStore(); + $value = $this->scopeConfig->getValue('web/default/front', ScopeInterface::SCOPE_STORE, $store); + return $value; } }