[freeside-commits] freeside/FS/FS cust_main.pm,1.246,1.247

Ivan,,, ivan at wavetail.420.am
Thu Oct 12 02:42:29 PDT 2006


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv21350

Modified Files:
	cust_main.pm 
Log Message:
fix "amatch: $_ is undefined: what are you matching" error when there are no companies in the fuzzy cache yet

Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -d -r1.246 -r1.247
--- cust_main.pm	7 Oct 2006 21:40:58 -0000	1.246
+++ cust_main.pm	12 Oct 2006 09:42:27 -0000	1.247
@@ -3969,12 +3969,12 @@
 
   check_and_rebuild_fuzzyfiles();
   foreach my $field ( keys %$fuzzy ) {
+
+    my $all = $self->all_X($field);
+    next unless scalar(@$all);
+
     my %match = ();
-    $match{$_}=1 foreach ( amatch( $fuzzy->{$field},
-                                   ['i'],
-                                   @{ $self->all_X($field) }
-                                 )
-                         );
+    $match{$_}=1 foreach ( amatch( $fuzzy->{$field}, ['i'], @$all ) );
 
     my @fcust = ();
     foreach ( keys %match ) {



More information about the freeside-commits mailing list