From 8946b6f68bce2003d760233a3ed0721287dfcb86 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 28 Dec 2010 00:35:45 +0000 Subject: [PATCH] Silence new warnings about lc(undef) introduced in perl 5.12. Patch from Todd Rinaldo, thanks! --- AuthorizeNet/AIM.pm | 6 +++--- AuthorizeNet/ARB.pm | 6 +++--- Changes | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/AuthorizeNet/AIM.pm b/AuthorizeNet/AIM.pm index 0039502..ed996a3 100644 --- a/AuthorizeNet/AIM.pm +++ b/AuthorizeNet/AIM.pm @@ -35,7 +35,7 @@ sub map_fields { 'post authorization' => 'PRIOR_AUTH_CAPTURE', 'void' => 'VOID', ); - $content{'action'} = $actions{lc($content{'action'})} || $content{'action'}; + $content{'action'} = $actions{lc($content{'action'} || '')} || $content{'action'}; # TYPE MAP my %types = ('visa' => 'CC', @@ -44,7 +44,7 @@ sub map_fields { 'discover' => 'CC', 'check' => 'ECHECK', ); - $content{'type'} = $types{lc($content{'type'})} || $content{'type'}; + $content{'type'} = $types{lc($content{'type'} || '')} || $content{'type'}; $self->transaction_type($content{'type'}); # ACCOUNT TYPE MAP @@ -53,7 +53,7 @@ sub map_fields { 'business checking' => 'CHECKING', 'business savings' => 'SAVINGS', ); - $content{'account_type'} = $account_types{lc($content{'account_type'})} + $content{'account_type'} = $account_types{lc($content{'account_type'} || '')} || $content{'account_type'}; if (length $content{'password'} == 15) { diff --git a/AuthorizeNet/ARB.pm b/AuthorizeNet/ARB.pm index 294114b..cc8289b 100644 --- a/AuthorizeNet/ARB.pm +++ b/AuthorizeNet/ARB.pm @@ -39,7 +39,7 @@ sub map_fields { 'cancel recurring authorization' => 'ARBCancelSubscriptionRequest', ); - $content{'action'} = $actions{lc($content{'action'})} || $content{'action'}; + $content{'action'} = $actions{lc($content{'action'} || '')} || $content{'action'}; # TYPE MAP my %types = ('visa' => 'CC', @@ -48,7 +48,7 @@ sub map_fields { 'discover' => 'CC', 'check' => 'ECHECK', ); - $content{'type'} = $types{lc($content{'type'})} || $content{'type'}; + $content{'type'} = $types{lc($content{'type'} || '')} || $content{'type'}; $self->transaction_type($content{'type'}); # ACCOUNT TYPE MAP @@ -57,7 +57,7 @@ sub map_fields { 'business checking' => 'businessChecking', 'business savings' => 'savings', ); - $content{'account_type'} = $account_types{lc($content{'account_type'})} + $content{'account_type'} = $account_types{lc($content{'account_type'} || '')} || $content{'account_type'}; # MASSAGE EXPIRATION diff --git a/Changes b/Changes index d0da072..4e87ea7 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ Revision history for Perl extension Business::OnlinePayment::AuthorizeNet. Thomas Sibley and, using it, provide more descriptive error messages. - Switch to Business::OnlinePayment::HTTPS instead of using Net::SSLeay directly + - Silence new warnings about lc(undef) introduced in perl 5.12. Patch + from Todd Rinaldo, thanks! 3.21 Tue Nov 24 10:45:21 PST 2009 - Add repository, contributing and contirbutor information to the docs. -- 2.11.0