Skip to content

Commit 5a793cc

Browse files
author
Hayder Sharhan
committed
MAGETWO-44235: Error when trying to assign a store from one website to another
- There was a dead end in the code. With this change, the user is redirected to the default store which would reset his cookies to that store.
1 parent d59a6fd commit 5a793cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Store/Model/StoreResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getCurrentStoreId()
8888
}
8989

9090
if (!in_array($store->getId(), $stores)) {
91-
throw new NoSuchEntityException(__('Requested scope cannot be loaded'));
91+
$store = $this->getDefaultStoreById($defaultStoreId);
9292
}
9393
} else {
9494
$store = $this->getDefaultStoreById($defaultStoreId);

0 commit comments

Comments
 (0)