From f4ee374e9bbb313234278c7231c046f8e07086f0 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 25 Mar 2016 12:29:35 -0700 Subject: [PATCH 1/1] avoid uninitialized value errors on upgrade --- FS/FS/Upgrade.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 2a480f872..eb2587b34 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 -- 2.11.0