summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2009-03-15 22:33:09 +0000
committerivan <ivan>2009-03-15 22:33:09 +0000
commit1c4c7cf9e2c1b4baae0453d844e23391cda7dfbb (patch)
tree14b809331a233eac3427d4b8c1bd2f45c3fc67f3 /FS
parentfcd4ede322d50422e38426908c4ef62611043435 (diff)
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
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_svc.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm
index 30b23908c..320f78aa0 100644
--- a/FS/FS/cust_svc.pm
+++ b/FS/FS/cust_svc.pm
@@ -629,7 +629,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;