From c95e406e68fef354f1e65aa34cd6d257b8dc1c48 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 Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- 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.39.5