From efe73ada7131ae134135e5e7f82588a8d10786fe Mon Sep 17 00:00:00 2001 From: Przemyslaw Piotrowski Date: Fri, 7 Oct 2022 11:13:08 +0200 Subject: [PATCH] Add check if array key exists before use it --- app/code/core/Mage/Review/Model/Resource/Review.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {