Skip to content

Commit

Permalink
Add check if array key isset before using it (#2649)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslaw-p authored Oct 7, 2022
1 parent 52f2c75 commit 1641eab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Review/Model/Resource/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1641eab

Please sign in to comment.