Bug 41866: "Use of uninitialized value..." warning in opac-search.pl

The warning
[WARN] Use of uninitialized value in concatenation (.) or string at
/kohadevbox/koha/opac/opac-search.pl line 600.
appears in plack-opac-error.log

Test plan:
==========
1. Observe plack-opac-error.log.
2. Go to Advanced search in OPAC.
3. Select any of item type ("Limit to any of the following:") in tab
   "Item type" and perform search (do not enter any "Search for:" terms).
==> Warning appears in plack-opac-error.log.
4. Apply the patch; restart_all.
5. Repeat 2-3.
==> No warning in plack-opac-error.log.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Roman Dolny 2026-03-07 20:48:05 +00:00 committed by Martin Renvoize
parent e89b043440
commit 82932c814b
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
1 changed files with 2 additions and 2 deletions

View File

@ -597,8 +597,8 @@ if ($tag) {
my $json = JSON->new->utf8->allow_nonref(1);
$pasarParams .= '&amp;query=' . uri_escape_utf8( $json->encode($query) );
$pasarParams .= '&amp;count=' . uri_escape_utf8($results_per_page);
$pasarParams .= '&amp;simple_query=' . uri_escape_utf8($simple_query);
$pasarParams .= '&amp;query_type=' . uri_escape_utf8($query_type) if ($query_type);
$pasarParams .= '&amp;simple_query=' . uri_escape_utf8($simple_query) if $simple_query;
$pasarParams .= '&amp;query_type=' . uri_escape_utf8($query_type) if ($query_type);
my $itemtypes_nocategory =
{ map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
eval {