Forward port paydriver upgrade bug fix. Undef was not handled.

This commit is contained in:
Colin Kuskie 2009-03-13 20:30:08 +00:00
parent f63b9ea5b9
commit 19368e5309
2 changed files with 4 additions and 5 deletions

View file

@ -51,7 +51,7 @@ sub setDefaultItransactCredentialTemplate {
my $drivers = $pay->getPaymentGateways($session);
DRIVER: foreach my $driver (@{ $drivers }) {
##Only work on ITransact drivers
next DRIVER unless $driver->className eq "WebGUI::Shop::PayDriver::ITransact";
next DRIVER unless $driver && $driver->className eq "WebGUI::Shop::PayDriver::ITransact";
my $properties = $driver->get();
##And only ones that don't already have a template set
next DRIVER if $properties->{credentialsTemplateId};