summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2009-03-15 22:33:10 +0000
committerivan <ivan>2009-03-15 22:33:10 +0000
commit0bf7c8fe7031c409524fa21adab5580f1df03d99 (patch)
tree1646d1e45a97d7061bab874cee88825801c3f1d5
parente5435ff8d58a350931f2e03d77fe5022830e5ee1 (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
-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 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;