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 <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2021-06-11 13:25:57 +02:00
parent a151d7ba0f
commit a56c4f63ba
1 changed files with 1 additions and 1 deletions

View File

@ -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 = {