From 76d7b15503b50b3bb33459006ff9fcab413ea15c Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 19 Jan 2010 17:49:06 +0000 Subject: [PATCH] eliminate harmless uninitialized value noise --- FS/FS/cust_main.pm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 50c840c51..a4f88b4f4 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2475,33 +2475,33 @@ sub bill_and_collect { $error = $self->cancel_expired_pkgs( $options{actual_time} ); if ( $error ) { $error = "Error expiring custnum ". $self->custnum. ": $error"; - if ( $options{'fatal'} eq 'return' ) { return $error; } - elsif ( $options{'fatal'} ) { die $error; } - else { warn $error; } + if ( $options{fatal} && $options{fatal} eq 'return' ) { return $error; } + elsif ( $options{fatal} ) { die $error; } + else { warn $error; } } $error = $self->suspend_adjourned_pkgs( $options{actual_time} ); if ( $error ) { $error = "Error adjourning custnum ". $self->custnum. ": $error"; - if ( $options{'fatal'} eq 'return' ) { return $error; } - elsif ( $options{'fatal'} ) { die $error; } - else { warn $error; } + if ( $options{fatal} && $options{fatal} eq 'return' ) { return $error; } + elsif ( $options{fatal} ) { die $error; } + else { warn $error; } } $error = $self->bill( %options ); if ( $error ) { $error = "Error billing custnum ". $self->custnum. ": $error"; - if ( $options{'fatal'} eq 'return' ) { return $error; } - elsif ( $options{'fatal'} ) { die $error; } - else { warn $error; } + if ( $options{fatal} && $options{fatal} eq 'return' ) { return $error; } + elsif ( $options{fatal} ) { die $error; } + else { warn $error; } } $error = $self->apply_payments_and_credits; if ( $error ) { $error = "Error applying custnum ". $self->custnum. ": $error"; - if ( $options{'fatal'} eq 'return' ) { return $error; } - elsif ( $options{'fatal'} ) { die $error; } - else { warn $error; } + if ( $options{fatal} && $options{fatal} eq 'return' ) { return $error; } + elsif ( $options{fatal} ) { die $error; } + else { warn $error; } } unless ( $conf->exists('cancelled_cust-noevents') @@ -2510,9 +2510,9 @@ sub bill_and_collect { $error = $self->collect( %options ); if ( $error ) { $error = "Error collecting custnum ". $self->custnum. ": $error"; - if ( $options{'fatal'} eq 'return' ) { return $error; } - elsif ( $options{'fatal'} ) { die $error; } - else { warn $error; } + if ($options{fatal} && $options{fatal} eq 'return') { return $error; } + elsif ($options{fatal} ) { die $error; } + else { warn $error; } } } -- 2.11.0