fix "Use of uninitialized valud $driver name in pattern match (m//) at /usr/local...
authorIvan Kohler <ivan@freeside.biz>
Sat, 14 Apr 2012 02:17:06 +0000 (19:17 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sat, 14 Apr 2012 02:17:06 +0000 (19:17 -0700)
FS/FS/part_event/Condition.pm
FS/FS/part_event/Condition/cust_bill_has_service.pm

index b394815..fc69f1d 100644 (file)
@@ -363,7 +363,7 @@ sub condition_sql_option_option {
 #used for part_event/Condition/cust_bill_has_service.pm and has_cust_tag.pm
 #a little false laziness w/above and condition_sql_option_integer
 sub condition_sql_option_option_integer {
-  my( $class, $option, $driver_name ) = @_;
+  my( $class, $option ) = @_;
 
   ( my $condname = $class ) =~ s/^.*:://;
 
@@ -375,7 +375,7 @@ sub condition_sql_option_option_integer {
           AND part_event_condition_option.optionvalue = 'HASH'
      )";
 
-  my $integer = ($driver_name =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER';
+  my $integer = (driver_name =~ /^mysql/) ? 'UNSIGNED INTEGER' : 'INTEGER';
 
   my $optionname = "CAST(optionname AS $integer)";
 
index 65c9964..6e981ee 100644 (file)
@@ -42,9 +42,7 @@ sub condition_sql {
   my( $class, $table, %opt ) = @_;
 
   my $servicenums =
-    $class->condition_sql_option_option_integer( 'has_service',
-                                                 $opt{'driver_name'},
-                                               );
+    $class->condition_sql_option_option_integer('has_service');
 
   my $sql = qq| 0 < ( SELECT COUNT(cs.svcpart)
      FROM cust_bill_pkg cbp, cust_svc cs