Add non-numeric package check to USPS driver.
This commit is contained in:
parent
e647c013b9
commit
0a3836bde3
1 changed files with 1 additions and 1 deletions
|
|
@ -199,7 +199,7 @@ sub _calculateFromXML {
|
|||
my $id = $package->{ID};
|
||||
my $rate = $package->{Postage}->{Rate};
|
||||
##Error check for invalid index
|
||||
if ($id < 0 || $id > $#shippableUnits) {
|
||||
if ($id < 0 || $id > $#shippableUnits || $id !~ /^\d+$/) {
|
||||
WebGUI::Error::Shop::RemoteShippingRate->throw(error => "Illegal package index returned by USPS: $id");
|
||||
}
|
||||
if (exists $package->{Error}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue