From 13965d2b1e4b5e18517dc23f5207797db8fff7ca Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Wed, 18 Feb 2026 11:28:09 +0000 Subject: [PATCH] Bug 41864: (Bug 40966 follow-up) Simple OPAC search generates warnings: Odd number of elements in anonymous hash After introducing Bug 40966 opac-search.pl, when invoked in the simple form (not as advanced search) generates warnings like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. Test plan: ========== 1. Perform a simple search from main OPAC page. 2. Check the content of plack-opac-error.log. You should see a warning like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. 3. Apply the patch ; restart_all. 4. Repeat p. 1. There should be no new warning now. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny --- opac/opac-search.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 7776d1c4ad..2dcb218dc7 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -539,7 +539,7 @@ if ( C4::Context->preference('OpacSuppression') ) { suppress => $suppress, is_opac => 1, weighted_fields => $weight_search, - weight_search_submitted => $cgi->param('weight_search_submitted') + weight_search_submitted => $cgi->param('weight_search_submitted') // undef } ); -- 2.39.5