Forward porting gateway driver upgrade fix, handling undefined drivers.

This commit is contained in:
Colin Kuskie 2009-03-13 20:48:43 +00:00
parent 19368e5309
commit 7792b9d9bc
2 changed files with 3 additions and 1 deletions

View file

@ -54,7 +54,8 @@ sub fixPayDriverLabels {
print "\tGet rid of the duplicate label properties in the PayDrivers... " unless $quiet;
my $pay = WebGUI::Shop::Pay->new($session);
my $gateways = $pay->getPaymentGateways;
foreach my $gateway (@{ $gateways }) {
GATEWAY: foreach my $gateway (@{ $gateways }) {
next GATEWAY unless $gateway;
my $gatewayId = $gateway->getId;
my $jsonLabel = $gateway->get('label');
next if $jsonLabel;