eliminate ya "use of uninitialized value" warning
authorivan <ivan>
Wed, 6 Jan 2010 04:43:46 +0000 (04:43 +0000)
committerivan <ivan>
Wed, 6 Jan 2010 04:43:46 +0000 (04:43 +0000)
FS/FS/cust_main.pm

index d9db2ed..fc16f14 100644 (file)
@@ -5043,10 +5043,12 @@ sub _new_bop_required {
   my $botpp = 'Business::OnlineThirdPartyPayment';
 
   return 1
   my $botpp = 'Business::OnlineThirdPartyPayment';
 
   return 1
-    if ( $conf->config('business-onlinepayment-namespace') eq $botpp ||
-         scalar( grep { $_->gateway_namespace eq $botpp } 
-                 qsearch( 'payment_gateway', { 'disabled' => '' } )
-               )
+    if (   (     $conf->exists('business-onlinepayment-namespace')
+             &&  $conf->config('business-onlinepayment-namespace') eq $botpp
+           )
+         or scalar( grep { $_->gateway_namespace eq $botpp } 
+                    qsearch( 'payment_gateway', { 'disabled' => '' } )
+                  )
        )
   ;
 
        )
   ;