Skip to content

Commit

Permalink
Fixing taxable if int (#131)
Browse files Browse the repository at this point in the history
* fixing model not being returned

* slight fix for taxable
  • Loading branch information
lukepolo committed May 11, 2016
1 parent f07493c commit ab2c278
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Traits/CartOptionsMagicMethodsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ab2c278

Please sign in to comment.