From: ivan Date: Sun, 15 Mar 2009 22:33:10 +0000 (+0000) Subject: don't throw 'Use of uninitialized value in addition (+) at /usr/local/share/perl... X-Git-Tag: freeside_1_7_4rc1~98 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=0bf7c8fe7031c409524fa21adab5580f1df03d99;p=freeside.git don't throw 'Use of uninitialized value in addition (+) at /usr/local/share/perl/5.8.8/FS/cust_svc.pm line 626.' error when using attribute_since_sqlradacct --- diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index b56dde7d7..42681a0e9 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -623,7 +623,8 @@ sub attribute_since_sqlradacct { ) or die $dbh->errstr; $sth->execute($username, $start, $end) or die $sth->errstr; - $sum += $sth->fetchrow_arrayref->[0]; + my $row = $sth->fetchrow_arrayref; + $sum += $row->[0] if defined($row->[0]); warn "$mes done SUMing sessions\n" if $DEBUG;