Skip to content

Commit

Permalink
MAGETWO-35512: [GitHub] Product Model sometimes values change in gett…
Browse files Browse the repository at this point in the history
…ers methods #1133
  • Loading branch information
Roman Ganin committed May 22, 2015
1 parent da8fcf2 commit a9ccc27
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/code/Magento/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2266,8 +2266,11 @@ public function getIdentities()
}
}
if ($this->getOrigData('status') != $this->getData('status')) {
foreach ($this->getData('category_ids') as $categoryId) {
$identities[] = self::CACHE_PRODUCT_CATEGORY_TAG . '_' . $categoryId;
$categoryIds = $this->getData('category_ids');
if (!empty($categoryIds)) {
foreach ($categoryIds as $categoryId) {
$identities[] = self::CACHE_PRODUCT_CATEGORY_TAG . '_' . $categoryId;
}
}
}
return array_unique($identities);
Expand Down

0 comments on commit a9ccc27

Please sign in to comment.