Skip to content

Commit 00b893a

Browse files
ENGCOM-2234: [Forwardport] Variable as a method parameter might be overridden by the loop #16642
- Merge Pull Request #16642 from lfluvisotto/magento2:2.3-develop-PR-port-16143 - Merged commits: 1. 9365393
2 parents 0c2fa6f + 9365393 commit 00b893a

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
@@ -534,12 +534,12 @@ public function updateQtyOption($options, \Magento\Framework\DataObject $option,
534534

535535
foreach ($selections as $selection) {
536536
if ($selection->getProductId() == $optionProduct->getId()) {
537-
foreach ($options as &$option) {
538-
if ($option->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
537+
foreach ($options as $quoteItemOption) {
538+
if ($quoteItemOption->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
539539
if ($optionUpdateFlag) {
540-
$option->setValue(intval($option->getValue()));
540+
$quoteItemOption->setValue(intval($quoteItemOption->getValue()));
541541
} else {
542-
$option->setValue($value);
542+
$quoteItemOption->setValue($value);
543543
}
544544
}
545545
}

0 commit comments

Comments
 (0)