From ab2c278aea32f8d46351a08fc58a4025841362ea Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Tue, 10 May 2016 23:11:20 -0400 Subject: [PATCH] Fixing taxable if int (#131) * fixing model not being returned * slight fix for taxable --- src/Traits/CartOptionsMagicMethodsTrait.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Traits/CartOptionsMagicMethodsTrait.php b/src/Traits/CartOptionsMagicMethodsTrait.php index 61f88aa..e73c1e9 100644 --- a/src/Traits/CartOptionsMagicMethodsTrait.php +++ b/src/Traits/CartOptionsMagicMethodsTrait.php @@ -6,7 +6,6 @@ use LukePOLO\LaraCart\Exceptions\InvalidPrice; use LukePOLO\LaraCart\Exceptions\InvalidQuantity; use LukePOLO\LaraCart\Exceptions\InvalidTaxableValue; -use LukePOLO\LaraCart\LaraCart; /** * Class CartOptionsMagicMethodsTrait @@ -62,7 +61,7 @@ public function __set($option, $value) } break; case CartItem::ITEM_TAXABLE: - if (!is_bool($value)) { + if (!is_bool($value) && $value != 0 && $value != 1) { throw new InvalidTaxableValue('The taxable option must be a boolean'); } break;