From aec7a82f6ba939ceba2d155c92c945e598c20c02 Mon Sep 17 00:00:00 2001 From: Will-I4M Date: Mon, 17 Oct 2016 08:42:40 +0200 Subject: [PATCH] In case something wrong with underlying products call to a member function getAmount() on boolean in vendor/magento/module-bundle/Pricing/Adjustment/Calculator.php on line 315 Fix this issue --- app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php index ae605a842d06f..2f093d10188f6 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php @@ -312,9 +312,11 @@ protected function calculateDynamicBundleAmount($basePriceValue, $bundleProduct, foreach ($selectionPriceList as $selectionPrice) { ++$i; - $amountList[$i]['amount'] = $selectionPrice->getAmount(); - // always honor the quantity given - $amountList[$i]['quantity'] = $selectionPrice->getQuantity(); + if ($selectionPrice) { + $amountList[$i]['amount'] = $selectionPrice->getAmount(); + // always honor the quantity given + $amountList[$i]['quantity'] = $selectionPrice->getQuantity(); + } } /** @var Store $store */