diff --git a/app/code/core/Mage/Review/Model/Resource/Review.php b/app/code/core/Mage/Review/Model/Resource/Review.php index f2cf190beec..2fc6c2534b9 100644 --- a/app/code/core/Mage/Review/Model/Resource/Review.php +++ b/app/code/core/Mage/Review/Model/Resource/Review.php @@ -357,7 +357,7 @@ public function aggregate($object) $writeAdapter->beginTransaction(); try { - if ($oldData['primary_id'] > 0) { + if (isset($oldData['primary_id']) && $oldData['primary_id'] > 0) { $condition = ["{$this->_aggregateTable}.primary_id = ?" => $oldData['primary_id']]; $writeAdapter->update($this->_aggregateTable, $data->getData(), $condition); } else {