Error appears when product added to shoppingcart

Hello, 

We getting an error when we add an product to the shoppingcart on our shop. 

For example when you go to https://shopware.myhair.nl/l-oreal-color-majiblond-ultra-900s/82005006 and put this product to the shoppingcart we get a error. You can see the error in the picture below:

Are the people with the same problem or with the solution?

I have encountered a similar problem. It was caused by a plugin, that generated line items and set their customFields value to null. In Shopware version 6.2 this was OK, but from 6.3, this error gets thrown. The solution to this was overriding that class in that plugin and setting the value of customFields to an empty array instead of null. When I have encountered the same problem on another occasion (a plugin, that generated promotions), I have just decided to solve it once and for all by overriding (decorating) the LineItemCustomFieldRule.php class by adding a similar condition to the method, that calls getValue. This ensures, that the method getValue always gets an array and does not throw an error.

1 „Gefällt mir“