diff options
author | ivan <ivan> | 2006-02-07 13:49:44 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-02-07 13:49:44 +0000 |
commit | b5bf46cd466f032971095ace1d26af0b98921ada (patch) | |
tree | 6292cc61ea5699ef72696fc9fec9160cc613632e | |
parent | 1acbcf55d8cd4675408f8ad3406f431623918c8d (diff) |
well, it was already fatal. at least now the error message is better.
-rw-r--r-- | FS/FS/svc_acct.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index c1851d3ce..759d7372e 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1077,7 +1077,10 @@ sub radius_check { my $password = $self->_password; my $pw_attrib = length($password) <= 12 ? $radius_password : 'Crypt-Password'; $check{$pw_attrib} = $password; - my $cust_pkg = $self->cust_svc->cust_pkg; + my $cust_svc = $self->cust_svc; + die "FATAL: no cust_svc record for svc_acct.svcnum ". $self->svcnum. "\n" + unless $cust_svc; + my $cust_pkg = $cust_svc->cust_pkg; if ( $cust_pkg && $cust_pkg->part_pkg->is_prepaid && $cust_pkg->bill ) { $check{'Expiration'} = time2str('%B %e %Y %T', $cust_pkg->bill ); #http://lists.cistron.nl/pipermail/freeradius-users/2005-January/040184.html } |