avoid uninitialized value errors on upgrade
[freeside.git] / FS / FS / Upgrade.pm
index bfb218f..eb2587b 100644 (file)
@@ -165,12 +165,6 @@ If you need to continue using the old Form 477 report, turn on the
     $conf->delete('voip-cust_email_csv_cdr') ;
   }
 
-  if ( !$conf->config('password-generated-characters') ) {
-    my $pw_set = 
-      'abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789()#.,' ;
-    $conf->set('password-generated-characters', $pw_set);
-  }
-
   if ($conf->exists('unsuspendauto') && !$conf->config('unsuspend_balance')) {
     $conf->set('unsuspend_balance','Zero');
     $conf->delete('unsuspendauto');
@@ -209,8 +203,9 @@ sub upgrade_overlimit_groups {
 sub upgrade_invoice_from {
   my ($conf, $agentnum, $agentonly) = @_;
   if (
-      (!$conf->exists('invoice_from_name',$agentnum,$agentonly)) && 
-      ($conf->config('invoice_from',$agentnum,$agentonly) =~ /\<(.*)\>/)
+          ! $conf->exists('invoice_from_name',$agentnum,$agentonly)
+       && $conf->exists('invoice_from',$agentnum,$agentonly)
+       && $conf->config('invoice_from',$agentnum,$agentonly) =~ /\<(.*)\>/
   ) {
     my $realemail = $1;
     $realemail =~ s/^\s*//; # remove leading spaces