[freeside-commits] freeside/FS/FS cust_main.pm,1.492,1.493

Jeff Finucane,420,, jeff at wavetail.420.am
Tue Jan 19 09:49:08 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31132

Modified Files:
	cust_main.pm 
Log Message:
eliminate harmless uninitialized value noise

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.492
retrieving revision 1.493
diff -u -d -r1.492 -r1.493
--- cust_main.pm	17 Jan 2010 03:31:52 -0000	1.492
+++ cust_main.pm	19 Jan 2010 17:49:06 -0000	1.493
@@ -2475,33 +2475,33 @@
   $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 @@
     $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; }
     }
   }
 



More information about the freeside-commits mailing list