diff options
| author | ivan <ivan> | 2009-03-15 22:33:10 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2009-03-15 22:33:10 +0000 | 
| commit | 0bf7c8fe7031c409524fa21adab5580f1df03d99 (patch) | |
| tree | 1646d1e45a97d7061bab874cee88825801c3f1d5 | |
| parent | e5435ff8d58a350931f2e03d77fe5022830e5ee1 (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.pm | 3 | 
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; | 
