Skip to content

Commit

Permalink
add extra check of quantity in Cart->update
Browse files Browse the repository at this point in the history
Workaround for #28 until time is available to investigate fully.
  • Loading branch information
SysPete committed Sep 28, 2015
1 parent a8b8e04 commit 892dae2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Interchange6/Cart.pm
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,9 @@ sub update {
die "quantity not supplied as arg to update for sku $sku"
unless defined $qty;

die "quantity must be a positive integer or zero"
unless $qty =~ /^\d+$/;

unless ( $product = $self->find($sku) ) {
die "Product for $sku not found in cart.";
}
Expand Down

0 comments on commit 892dae2

Please sign in to comment.