diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-03-25 12:29:36 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-03-25 12:29:36 -0700 |
commit | 650682d61cb09233b106c83d50259e8bd7acee20 (patch) | |
tree | 8286872a7b81f8939e0c74d084b83f62062c8c82 | |
parent | c070aecf4002f55ed83385bd58c1cab6658d6bb3 (diff) |
avoid uninitialized value errors on upgrade
-rw-r--r-- | FS/FS/Upgrade.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 2841981fa..1aae55d87 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -203,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 |