mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
Well...
This commit is contained in:
@@ -75,7 +75,7 @@ class CartItem implements Arrayable
|
|||||||
{
|
{
|
||||||
if(empty($id)) throw new \InvalidArgumentException('Please supply a valid identifier.');
|
if(empty($id)) throw new \InvalidArgumentException('Please supply a valid identifier.');
|
||||||
if(empty($name)) throw new \InvalidArgumentException('Please supply a valid name.');
|
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.');
|
throw new \InvalidArgumentException('Please supply a valid price.');
|
||||||
|
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
|
|||||||
Reference in New Issue
Block a user