Skip to content

Commit 8411a5c

Browse files
author
Roman Lytvynenko
committed
MC-19706: URL rewrite not created upon creating the product
1 parent b7801f4 commit 8411a5c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

app/code/Magento/Catalog/Model/Product.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,9 @@ public function getStoreIds()
837837
}
838838
foreach ($websiteIds as $websiteId) {
839839
$websiteStores = $this->_storeManager->getWebsite($websiteId)->getStoreIds();
840-
$storeIds = $storeIds + $websiteStores;
840+
foreach ($websiteStores as $websiteStore) {
841+
$storeIds []= $websiteStore;
842+
}
841843
}
842844
}
843845
$this->setStoreIds($storeIds);

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,11 @@ public function testGetStoreSingleSiteModelIds(
470470

471471
$this->model->isObjectNew($isObjectNew);
472472

473-
$this->storeManager->expects($this->exactly(
474-
(int) !$isObjectNew
475-
))
473+
$this->storeManager->expects(
474+
$this->exactly(
475+
(int) !$isObjectNew
476+
)
477+
)
476478
->method('isSingleStoreMode')
477479
->will($this->returnValue(true));
478480

0 commit comments

Comments
 (0)