From 770389e16137fd664c9ff1e27d67c692b4e2889f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 11 Jun 2021 13:25:57 +0200 Subject: [PATCH] Bug 28383: Fix itemsearch when accessed from the login form There are params here (credentials), we need to test for the existence of $format. Test plan: logout access /cgi-bin/koha/catalogue/itemsearch.pl Login => Without this patch you get a 500 (because we hit the exit statement) => With this patch you see the items search form. Signed-off-by: David Nind --- catalogue/itemsearch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index f5f66fe349..0329f4b1d8 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -106,7 +106,7 @@ if ( Koha::MarcSubfieldStructures->search( { frameworkcode => '', kohafield => ' $template->param( has_new_status => 1 ); } -if (scalar keys %params > 0) { +if ( defined $format ) { # Parameters given, it's a search my $filter = { -- 2.20.1