Update Cart.php

This commit is contained in:
Patrick
2022-01-18 00:10:58 +01:00
committed by GitHub
parent f6dcf2b9c6
commit d19032c2a1

View File

@@ -751,7 +751,7 @@ class Cart
*
* @return \Gloudemans\Shoppingcart\CartItem
*/
private function createCartItem($id, string $name, $qty, $price, $weight, array $options) : CartItem
private function createCartItem($id, ?string $name = null, $qty, $price, $weight, array $options) : CartItem
{
if ($id instanceof Buyable) {
$cartItem = CartItem::fromBuyable($id, $qty ?: []);