shopware-variant-switch
shopware-variant-switch copied to clipboard
Bug add extension on null
in one of our Shopware 6 shops we have two other plugins active in addition to your plugin.
That would be “shopping cart free products / goals | by 28minds” and “Award Items”. As soon as a free product or a bonus item (using these plugins) is placed in the shopping cart, your plugin will issue an error message. In the CartPageLoadedSubscriber.php file, in line 122 of the addLineItemPropertyGroups function, the $lineItem parameter is set to zero, which leads to an error. Would it be an option here to include an if statement that checks whether $lineItem !== is null?