Skip to content

Commit 1f0779e

Browse files
authored
Do not load product when it is already loaded (OpenMage#1698)
1 parent 4bd2476 commit 1f0779e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/code/core/Mage/Review/Block/Form.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ public function __construct()
8181
*/
8282
public function getProductInfo()
8383
{
84+
$product = Mage::registry('current_product');
85+
if (is_object($product) && ($product->getId() == $this->getRequest()->getParam('id')))
86+
return $product;
87+
8488
$product = Mage::getModel('catalog/product');
8589
return $product->load($this->getRequest()->getParam('id'));
8690
}

0 commit comments

Comments
 (0)