fix service searching, RT#12477
[freeside.git] / FS / FS / svc_hardware.pm
index 5b81a9c..96a8e76 100644 (file)
@@ -112,7 +112,12 @@ sub search_sql {
     $hex =~ s/\W//g;
     push @where, 'svc_hardware.hw_addr LIKE \'%'.$hex.'%\'';
   }
-  '(' . join(' OR ', @where) . ')';
+
+  if ( @where ) {
+    '(' . join(' OR ', @where) . ')';
+  } else {
+    '1 = 0'; #false
+  }
 }
 
 sub label {