From f73b44bbf77e5a1892515b52c2a739b43b3e5abe Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 5 Feb 2022 19:16:38 +0100 Subject: [PATCH] Update Cart.php --- src/Cart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cart.php b/src/Cart.php index db45319..f1b0291 100644 --- a/src/Cart.php +++ b/src/Cart.php @@ -142,7 +142,7 @@ class Cart throw new InvalidArgumentException('$qtyOrOptions must be of array (options) or null when adding a Buyable instance'); } - $cartItem = CartItem::fromBuyable($id, $nameOrQty ?: 1, $qtyOrOptions ?: []); + $cartItem = CartItem::fromBuyable($id, $nameOrQty ?: 1, new CartItemOptions($qtyOrOptions ?: [])); $cartItem->associate($id); return $this->addCartItem($cartItem);