Broaden assertion

abundance of caution etc
This commit is contained in:
Juerd Waalboer 2023-04-13 23:10:51 +02:00
parent 615ba66655
commit c71455fb0a

View file

@ -171,9 +171,9 @@ sub hook_checkout_prepare($class, $cart, $username, $transaction_id, @) {
or next;
for my $addon (@{ $sg->{statiegeld_addons} }) {
# These should never contain commas in vanilla revbank, but custom
# plugins may be less well behaved.
/,/ and die "Internal error"
# These should never contain spaces or commas in vanilla revbank,
# but custom plugins may be less well behaved.
/[\s,]/ and die "Internal error"
for $addon->{id}, $entry->attribute('product_id'), $transaction_id;
for (1 .. $entry->quantity) {