diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailabilityValidator.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailabilityValidator.php index 0b53666c5e..519669a3bb 100644 --- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailabilityValidator.php +++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailabilityValidator.php @@ -80,7 +80,7 @@ public function validate($value, Constraint $constraint): void private function getExistingCartItemQuantityFromCart(OrderInterface $cart, OrderItemInterface $cartItem): float { $product = $cartItem->getProduct(); - $quantity = $cartItem->getDefaultUnitQuantity(); + $quantity = $cartItem->getDefaultUnitQuantity() ?? 0; /** * @var OrderItemInterface $item