Skip to content

Commit 73f43d7

Browse files
ENGCOM-3833: 2.2 develop pr port 18888 #20183
- Merge Pull Request #20183 from saphaljha/magento2:2.2-develop-PR-port-18888 - Merged commits: 1. 06443f9 2. cb6ff7e 3. 56a0f11 4. 9c59356 5. fd4dd39 6. a26b9bd 7. 30a6d5a
2 parents a392746 + 30a6d5a commit 73f43d7

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/Review/Model/ResourceModel

1 file changed

+3
-1
lines changed

app/code/Magento/Review/Model/ResourceModel/Rating.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,11 @@ public function getReviewSummary($object, $onlyForCurrentStore = true)
425425

426426
$data = $connection->fetchAll($select, [':review_id' => $object->getReviewId()]);
427427

428+
$currentStore = $this->_storeManager->isSingleStoreMode() ? $this->_storeManager->getStore()->getId() : null;
429+
428430
if ($onlyForCurrentStore) {
429431
foreach ($data as $row) {
430-
if ($row['store_id'] == $this->_storeManager->getStore()->getId()) {
432+
if ($row['store_id'] !== $currentStore) {
431433
$object->addData($row);
432434
}
433435
}

0 commit comments

Comments
 (0)