Skip Menu |

This queue is for tickets about the Business-OnlinePayment-AuthorizeNet CPAN distribution.

Report information
The Basics
Id: 56172
Status: resolved
Priority: 0/
Queue: Business-OnlinePayment-AuthorizeNet

People
Owner: Nobody in particular
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 3.21
Fixed in: 3.22



Subject: perl 5.12 - Use of uninitialized value $content{"account_type"} in lc at...
perl 5.12 is going to start complaining about lc(undef) calls with a warning. The tests are very noisy as a result. Without a heck of allot more knowledge of this code, I recommend this patch as a quick fix.
Subject: patch.txt
diff --git a/AuthorizeNet/AIM.pm b/AuthorizeNet/AIM.pm index 2906079..0b0d6b7 100644 --- a/AuthorizeNet/AIM.pm +++ b/AuthorizeNet/AIM.pm @@ -38,7 +38,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', @@ -47,7 +47,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 @@ -56,7 +56,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'}; $content{'referer'} = defined( $content{'referer'} ) 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
FYI, 5.12 will be out shortly. I'd REALLY like to see 55172 get fixed, but if there is no quick solution for it, would it be possible to get a quick release out with this patch please?
On Wed Mar 31 13:55:02 2010, TODDR wrote: Show quoted text
> FYI, 5.12 will be out shortly. I'd REALLY like to see 55172 get fixed, > but if there is no quick > solution for it, would it be possible to get a quick release out with > this patch please?
I appreciate your enthusiasm... I probably have a longer perspective on things. To be blunt, I wouldn't really expect to have time to look into this myself in the immediate future. None of my production use of AuthorizeNet involves upgrades to bleeding-edge perl, what can I say? :) But I wouldn't want to stand in the way of progress; if you'd like to check your changes into our repository and make a 3.22_01 developer release, I'd be happy to give you access and make you a co-maint on CPAN.
Subject: Re: [rt.cpan.org #56172] perl 5.12 - Use of uninitialized value $content{"account_type"} in lc at...
Date: Fri, 30 Apr 2010 13:00:35 -0500
To: bug-Business-OnlinePayment-AuthorizeNet [...] rt.cpan.org
From: Todd Rinaldo <toddr [...] null.net>
On Thu, Apr 1, 2010 at 2:22 AM, Ivan Kohler via RT <bug-Business-OnlinePayment-AuthorizeNet@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=56172 > > > On Wed Mar 31 13:55:02 2010, TODDR wrote:
>> FYI, 5.12 will be out shortly. I'd REALLY like to see 55172 get fixed, >> but if there is no quick >> solution for it, would it be possible to get a quick release out with >> this patch please?
> > I appreciate your enthusiasm... I probably have a longer perspective on > things.  To be blunt, I wouldn't really expect to have time to look into > this myself in the immediate future.  None of my production use of > AuthorizeNet involves upgrades to bleeding-edge perl, what can I say?  :) > > But I wouldn't want to stand in the way of progress; if you'd like to > check your changes into our repository and make a 3.22_01 developer > release, I'd be happy to give you access and make you a co-maint on CPAN.
Sounds good. Where is your repository? Thanks, Todd
On Fri Apr 30 14:00:49 2010, toddr@null.net wrote: Show quoted text
> On Thu, Apr 1, 2010 at 2:22 AM, Ivan Kohler via RT > <bug-Business-OnlinePayment-AuthorizeNet@rt.cpan.org> wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=56172 > > > > > On Wed Mar 31 13:55:02 2010, TODDR wrote:
> >> FYI, 5.12 will be out shortly. I'd REALLY like to see 55172 get fixed, > >> but if there is no quick > >> solution for it, would it be possible to get a quick release out with > >> this patch please?
> > > > I appreciate your enthusiasm... I probably have a longer perspective on > > things.  To be blunt, I wouldn't really expect to have time to look into > > this myself in the immediate future.  None of my production use of > > AuthorizeNet involves upgrades to bleeding-edge perl, what can I
say?  :) Show quoted text
> > > > But I wouldn't want to stand in the way of progress; if you'd like to > > check your changes into our repository and make a 3.22_01 developer > > release, I'd be happy to give you access and make you a co-maint on
CPAN. Show quoted text
> > > Sounds good. Where is your repository?
CVSROOT=":pserver:anonymous@cvs.freeside.biz:/home/cvs/cvsroot" # The password for the user `anonymous' is `anonymous'. I'll email you directly to arrange commit access.