Bug 42803: Fix case where filter is not supplied
This change fixes the case where "Any library" and "Any item type" weren't validating. Test plan: 0) Apply the patch 1) Set strict_sql_modes to 0 in koha-conf.xml and restart plack 2) Go to Reports > Items with no checkouts: <staff_url>/cgi-bin/koha/reports/catalogue_out.pl 3) Leave Library set to "Any library" 4) Pick a specific item type that you know has items (e.g. "BK") 5) Note that you get results Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
fc845e1093
commit
c60f67e089
|
|
@ -50,7 +50,7 @@ my @filters_input = $input->multi_param("Filter");
|
|||
#NOTE: Validate Filter parameter
|
||||
if (@filters_input) {
|
||||
foreach my $filter (@filters_input) {
|
||||
if ( Koha::Libraries->find($filter) || Koha::ItemTypes->find($filter) ) {
|
||||
if ( Koha::Libraries->find($filter) || Koha::ItemTypes->find($filter) || !$filter ) {
|
||||
push( @filters, $filter );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue