mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-24 07:55:35 +00:00
Update Cart.php
This commit is contained in:
@@ -134,7 +134,7 @@ class Cart
|
|||||||
}
|
}
|
||||||
/* Also allow passing a Buyable instance, get data from the instance rather than parameters */
|
/* Also allow passing a Buyable instance, get data from the instance rather than parameters */
|
||||||
else if ($id instanceof Buyable) {
|
else if ($id instanceof Buyable) {
|
||||||
if (! is_int($nameOrQty)) {
|
if (! is_null($qtyOrOptions) && ! is_int($nameOrQty)) {
|
||||||
throw new InvalidArgumentException('$nameOrQty must be of int (quantity) when adding a Buyable instance');
|
throw new InvalidArgumentException('$nameOrQty must be of int (quantity) when adding a Buyable instance');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user