diff --git a/app/code/Magento/Msrp/Pricing/MsrpPriceCalculator.php b/app/code/Magento/Msrp/Pricing/MsrpPriceCalculator.php index 3d1e5ef0b8e6c..9257b0b78cda1 100644 --- a/app/code/Magento/Msrp/Pricing/MsrpPriceCalculator.php +++ b/app/code/Magento/Msrp/Pricing/MsrpPriceCalculator.php @@ -23,9 +23,15 @@ class MsrpPriceCalculator implements MsrpPriceCalculatorInterface /** * @param array $msrpPriceCalculators */ - public function __construct(array $msrpPriceCalculators) + public function __construct(?array $msrpPriceCalculators = null) { - $this->msrpPriceCalculators = $this->getMsrpPriceCalculators($msrpPriceCalculators); + /* + * This is a workaround for the case of modules Magento_MsrpConfigurableProduct and Magento_MsrpGroupedProduct + * are disabled. + */ + if (\is_array($msrpPriceCalculators)) { + $this->msrpPriceCalculators = $this->getMsrpPriceCalculators($msrpPriceCalculators); + } } /**