Skip to content

Commit bbb0d24

Browse files
committed
Variable as a method parameter might be overridden by the loop
1 parent 695aaf8 commit bbb0d24

File tree

1 file changed

+4
-4
lines changed
  • app/code/Magento/Bundle/Model/Product

1 file changed

+4
-4
lines changed

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,12 @@ public function updateQtyOption($options, \Magento\Framework\DataObject $option,
536536

537537
foreach ($selections as $selection) {
538538
if ($selection->getProductId() == $optionProduct->getId()) {
539-
foreach ($options as &$option) {
540-
if ($option->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
539+
foreach ($options as $quoteItemOption) {
540+
if ($quoteItemOption->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
541541
if ($optionUpdateFlag) {
542-
$option->setValue(intval($option->getValue()));
542+
$quoteItemOption->setValue(intval($quoteItemOption->getValue()));
543543
} else {
544-
$option->setValue($value);
544+
$quoteItemOption->setValue($value);
545545
}
546546
}
547547
}

0 commit comments

Comments
 (0)