This commit is contained in:
Rob Gloudemans
2016-06-15 10:20:37 +02:00

View File

@@ -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;