The MDVA-30945 Magento patch fixes the issue where you receive a fatal error Call to a member function getValue() on null in module-configurable-product CartItemProcessor.php when updating carts. This patch is available when the Magento Quality Patch (MQP) tool 1.0.7 is installed. The issue is scheduled to be fixed in Magento version 2.4.2.
Affected products and versions
The patch is created for Magento version:
Magento Commerce and Magento Commerce Cloud 2.3.0 - 2.4.1.
Note: the patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run
A fatal PHP error after products in cart are updated in the Admin.
Steps to reproduce:
1. In Magento Admin, create a configurable product without options.
2. Add it to the cart on storefront.
3. Return to Admin and add configurable options to the product, save the changes.
4. Refresh the cart page on the storefront.
Cart page is blank. In the PHP error.log the following error is logged: Uncaught exception 'Error' with message 'Call to a member function getValue() on null' in vendor/magento/module-configurable-product/Model/Quote/Item/CartItemProcessor.php:76
On the cart page, the following validation message is displayed: Some of the products below do not have all the required options.
Apply the patch
For instructions on how to apply an MQP patch, use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool.
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches.
To learn more about Magento Quality Patches, refer to:
- Magento Quality Patches released: a new tool to self-serve quality patches.
- Check if patch is available for your Magento issue using Magento Quality Patches.
For info about other patches available in MQP tool, refer to the Patches available in MQP tool section.