Bug 24964: Fix perl critic warning
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 26 Mar 2020 12:53:59 +0000 (08:53 -0400)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 27 Mar 2020 08:35:23 +0000 (08:35 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

C4/Utils/DataTables/Members.pm

index d2b4089..b0d1d0b 100644 (file)
@@ -172,7 +172,7 @@ sub search {
         push @where_args, ($has_permission->{module_bit}) x 2, $has_permission->{subpermission};
     }
 
-    my $where = " WHERE " . join (" AND ", @where_strs) if @where_strs;
+    my $where = @where_strs ? " WHERE " . join (" AND ", @where_strs) : undef;
     my $orderby = dt_build_orderby($dt_params);
 
     my $limit;