Skip to content

Commit e4a5d38

Browse files
authored
MAGETWO-66746: In case something wrong with underlying products #7045
2 parents 1d370cd + 11fcd0f commit e4a5d38

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,11 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct,
316316

317317
foreach ($selectionPriceList as $selectionPrice) {
318318
++$i;
319-
$amountList[$i]['amount'] = $selectionPrice->getAmount();
320-
// always honor the quantity given
321-
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
319+
if ($selectionPrice) {
320+
$amountList[$i]['amount'] = $selectionPrice->getAmount();
321+
// always honor the quantity given
322+
$amountList[$i]['quantity'] = $selectionPrice->getQuantity();
323+
}
322324
}
323325

324326
/** @var Store $store */

0 commit comments

Comments
 (0)