summaryrefslogtreecommitdiff
path: root/FS/FS/svc_hardware.pm
diff options
context:
space:
mode:
authorivan <ivan>2011-04-14 18:00:01 +0000
committerivan <ivan>2011-04-14 18:00:01 +0000
commitf9e0909b36ecd985d95ee85551b7cd34a960bc7c (patch)
treeb9ee0783128177b554f92430f05504f37a1b3acd /FS/FS/svc_hardware.pm
parent933bc89d0924f1c47eba58810a2d184ebde3c971 (diff)
fix service searching, RT#12477
Diffstat (limited to 'FS/FS/svc_hardware.pm')
-rw-r--r--FS/FS/svc_hardware.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/svc_hardware.pm b/FS/FS/svc_hardware.pm
index 5b81a9c..96a8e76 100644
--- a/FS/FS/svc_hardware.pm
+++ b/FS/FS/svc_hardware.pm
@@ -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 {