Bug fix: removed unintended variable localization
[freeside.git] / FS / FS / reason.pm
index 864804d..9c34dd9 100644 (file)
@@ -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;