From 676e6e8c4fd3281527a357991dcac665ab1105e9 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 --- 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.11.0