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

SF.net SVN: ledger-smb:[4183] branches/1.3/LedgerSMB/DBObject.pm



Revision: 4183
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4183&view=rev
Author:   tshvr
Date:     2011-12-09 13:11:02 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
avoid msg Use of uninitialized value

Modified Paths:
--------------
    branches/1.3/LedgerSMB/DBObject.pm

Modified: branches/1.3/LedgerSMB/DBObject.pm
===================================================================
--- branches/1.3/LedgerSMB/DBObject.pm	2011-12-09 12:28:29 UTC (rev 4182)
+++ branches/1.3/LedgerSMB/DBObject.pm	2011-12-09 13:11:02 UTC (rev 4183)
@@ -329,10 +329,17 @@
 sub _db_array_scalars {
     my $self = shift @_;
     my @args = @_;
+    #print STDERR localtime()." DBObject.pm _db_array_scalars @args=".Data::Dumper::Dumper(..hidden..)."\n";
     for my $arg (@args){
-        $arg =~ s/(["{},])/\\$1/g;
-        if ($arg =~ /(\s|\\)/){
-           $arg = qq|"$arg"|;
+        if(defined($arg))
+        {
+         $arg =~ s/(["{},])/\\$1/g;
+         if ($arg =~ /(\s|\\)/){$arg = qq|"$arg"|;}
+        }#defined
+        else
+        {
+         $arg='"dummy_to_avoid_msg_Use_of_uninitialized_value"';
+         #print STDERR localtime()." DBObject.pm _db_array_scalars setting dummy\n";
         }
     }
     return $self->_db_array_literal(@args);
@@ -350,6 +357,7 @@
             $return_string =~ s/\}$/,$arg\}/
         }
     }
+    print STDERR localtime()." DBObject.pm _db_array_literal \$return_string=$return_string\n";
     return $return_string;
 }
 

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