Log any errors found when calling Shop::Pay->getDrivers, instead of
silently passing them along.
This commit is contained in:
parent
ac9be28857
commit
278e4c6461
2 changed files with 8 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
7.7.18
|
7.7.18
|
||||||
|
- fixed: Logging errors when getting the list of available driver classes.
|
||||||
- fixed #10797: Unable to search for non-ASCII text
|
- fixed #10797: Unable to search for non-ASCII text
|
||||||
- fixed #10800: Ogone payment driver typo
|
- fixed #10800: Ogone payment driver typo
|
||||||
- fixed #10799: Shop: Ogone payment driver- typo
|
- fixed #10799: Shop: Ogone payment driver- typo
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,13 @@ This subroutine returns a hash reference of available shipping driver classes as
|
||||||
sub getDrivers {
|
sub getDrivers {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my %drivers = ();
|
my %drivers = ();
|
||||||
foreach my $class (@{$self->session->config->get('paymentDrivers')}) {
|
CLASS: foreach my $class (@{$self->session->config->get('paymentDrivers')}) {
|
||||||
$drivers{$class} = eval { WebGUI::Pluggable::instanciate($class, 'getName', [ $self->session ])};
|
my $driverName = eval { WebGUI::Pluggable::instanciate($class, 'getName', [ $self->session ])};
|
||||||
|
if ($@) {
|
||||||
|
$self->session->log->warn("Error loading $class: $@");
|
||||||
|
}
|
||||||
|
next CLASS unless $driverName;
|
||||||
|
$drivers{$class} = $driverName;
|
||||||
}
|
}
|
||||||
return \%drivers;
|
return \%drivers;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue