Skip to content

Commit 68d565c

Browse files
ENGCOM-2176: Variable as a method parameter might be overridden by the loop #16143
- Merge Pull Request #16143 from lfluvisotto/magento2:2.2-develop-variable-renamed - Merged commits: 1. bbb0d24
2 parents c68a963 + bbb0d24 commit 68d565c

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)