[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5922] trunk/LedgerSMB/PGNumber.pm



Revision: 5922
          http://sourceforge.net/p/ledger-smb/code/5922
Author:   tshvr
Date:     2013-07-24 11:00:42 +0000 (Wed, 24 Jul 2013)
Log Message:
-----------
avoid 'Use of uninitialized value  in string eq'

Modified Paths:
--------------
    trunk/LedgerSMB/PGNumber.pm

Modified: trunk/LedgerSMB/PGNumber.pm
===================================================================
--- trunk/LedgerSMB/PGNumber.pm	2013-07-24 08:35:17 UTC (rev 5921)
+++ trunk/LedgerSMB/PGNumber.pm	2013-07-24 11:00:42 UTC (rev 5922)
@@ -111,12 +111,16 @@
 sub from_input {
     my $self   = shift @_;
     my $string = shift @_;
-    $string = undef if $string eq '';
+    #tshvr4 avoid 'Use of uninitialized value $string in string eq'
+    if(!defined $string || $string eq ''){
+     return undef;
+    }
+    #$string = undef if $string eq '';
     my %args   = (ref($_[0]) eq 'HASH')? %{$_[0]}: @_;  
     my $format = ($args{format}) ? $args{format}
                               : $LedgerSMB::App_State::User->{numberformat};
     die 'LedgerSMB::PGNumber No Format Set' if !$format;
-    return undef if !defined $string;
+    #return undef if !defined $string;
     my $negate;
     my $pgnum;
     my $newval;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.