Bugzilla – Attachment 152588 Details for
Bug 33896
Catalog search from the masthead searchbar produces a warning in the logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33896: Check whether index is defined before string match
Bug-33896-Check-whether-index-is-defined-before-st.patch (text/plain), 1.39 KB, created by
Katrin Fischer
on 2023-06-22 20:16:16 UTC
(
hide
)
Description:
Bug 33896: Check whether index is defined before string match
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-06-22 20:16:16 UTC
Size:
1.39 KB
patch
obsolete
>From b7fc063de633c84b00c372cdbaa093df2ad1ec3f Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 5 Jun 2023 13:08:47 +0000 >Subject: [PATCH] Bug 33896: Check whether index is defined before string match > >This patch checks that $indexes[$i] is defined before testing whether the string matches to remove the logged warning when searching > >Test plan: >1) In the intranet, search the catalog from the top search bar >2) Check plack-intranet-error.log >3) There should be a warning "[WARN] Use of uninitialized value within @indexes in string eq" >4) Apply patch >5) restart_all and then re-try the search >6) The warning should no longer appear > >Signed-off-by: David Cook <dcook@prosentient.com.au> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > catalogue/search.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index f3b5d7bdbc..5954bf2d67 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -461,7 +461,7 @@ my $searcher = Koha::SearchEngine::Search->new( > > # If index indicates the value is a barocode, we need to preproccess it before searching > for ( my $i = 0; $i < @operands; $i++ ) { >- $operands[$i] = barcodedecode($operands[$i]) if $indexes[$i] eq 'bc'; >+ $operands[$i] = barcodedecode($operands[$i]) if (defined($indexes[$i]) && $indexes[$i] eq 'bc'); > } > > ## I. BUILD THE QUERY >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33896
:
151990
|
152030
| 152588