[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 7150fcff4de104614319b5c57104d55e250dc8c3

Ivan ivan at 420.am
Fri Apr 13 19:17:07 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  7150fcff4de104614319b5c57104d55e250dc8c3 (commit)
      from  51f6b315033d81513640a373b3d4313246df1a91 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7150fcff4de104614319b5c57104d55e250dc8c3
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Apr 13 19:17:07 2012 -0700

    fix "Use of uninitialized valud $driver name in pattern match (m//) at /usr/local/share/perl/5.10.1/FS/part_event/Condition.pm" warnings, cust_bill_has_service and has_cust_tag conditions under MySQL, fallout from RT#17035

diff --git a/FS/FS/part_event/Condition.pm b/FS/FS/part_event/Condition.pm
index c759908..64a4d5b 100644
--- a/FS/FS/part_event/Condition.pm
+++ b/FS/FS/part_event/Condition.pm
@@ -347,7 +347,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/^.*:://;
 
@@ -359,7 +359,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)";
 
diff --git a/FS/FS/part_event/Condition/cust_bill_has_service.pm b/FS/FS/part_event/Condition/cust_bill_has_service.pm
index 65c9964..6e981ee 100644
--- a/FS/FS/part_event/Condition/cust_bill_has_service.pm
+++ b/FS/FS/part_event/Condition/cust_bill_has_service.pm
@@ -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

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_event/Condition.pm                      |    4 ++--
 .../part_event/Condition/cust_bill_has_service.pm  |    4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list