From: Jonathan Prykop Date: Tue, 10 Feb 2015 20:06:29 +0000 (-0600) Subject: Bug fix: removed unintended variable localization X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=0db02d518080007ae5c682836390cdb5e14ac916;p=freeside.git Bug fix: removed unintended variable localization --- diff --git a/FS/FS/reason.pm b/FS/FS/reason.pm index 864804d26..9c34dd98a 100644 --- a/FS/FS/reason.pm +++ b/FS/FS/reason.pm @@ -174,7 +174,7 @@ sub new_or_existing { } } else { my %hash = ('class' => $opt{'class'}, 'type' => $opt{'type'}); - my $reason_type = qsearchs('reason_type', \%hash) + $reason_type = qsearchs('reason_type', \%hash) || FS::reason_type->new(\%hash); $error = $reason_type->insert unless $reason_type->typenum;