Skip to content

Commit 80c0d08

Browse files
committed
magento#39641 Replace loop variable name to correct the "cache" effect on subsequent calls on the same $product object
1 parent 96dec49 commit 80c0d08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,8 @@ public function getUsedProductIds($product)
552552
{
553553
if (!$product->hasData($this->_usedProductIds)) {
554554
$usedProductIds = [];
555-
foreach ($this->getUsedProducts($product) as $product) {
556-
$usedProductIds[] = $product->getId();
555+
foreach ($this->getUsedProducts($product) as $childProduct) {
556+
$usedProductIds[] = $childProduct->getId();
557557
}
558558
$product->setData($this->_usedProductIds, $usedProductIds);
559559
}

0 commit comments

Comments
 (0)