diff --git a/src/LaraCart.php b/src/LaraCart.php index b252694..0c6a01b 100644 --- a/src/LaraCart.php +++ b/src/LaraCart.php @@ -747,7 +747,7 @@ public function totalDiscount($format = true, $withItemDiscounts = true) if ($withItemDiscounts) { /** @var CartItem $item */ - foreach ($this->cart->items as $item) { + foreach ((array) $this->cart->items as $item) { $total += floatval($item->getDiscount(false)); } }