diff --git a/src/CartItem.php b/src/CartItem.php index 42ed74d..39c7ab5 100644 --- a/src/CartItem.php +++ b/src/CartItem.php @@ -75,7 +75,7 @@ class CartItem implements Arrayable { if(empty($id)) throw new \InvalidArgumentException('Please supply a valid identifier.'); if(empty($name)) throw new \InvalidArgumentException('Please supply a valid name.'); - if(empty($price) || ! is_numeric($price)) + if(strlen($price) < 0 || ! is_numeric($price)) throw new \InvalidArgumentException('Please supply a valid price.'); $this->id = $id;