]> git.koha-community.org Git - koha.git/commit
Bug 33896: Check whether index is defined before string match
authorMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Mon, 5 Jun 2023 13:08:47 +0000 (13:08 +0000)
committerPedro Amorim <pedro.amorim@ptfs-europe.com>
Tue, 18 Jul 2023 11:20:10 +0000 (11:20 +0000)
commit75a1c7966d44af971c7d6b8d383f6f336c71f917
tree6d9f21ba472487d66813d7003244919b5716b445
parenta25d826d08b267afa24ab2030e9e8ae7ebceadbe
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e0c09d230ce46e9d085a970625408744814cbdc5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 596d63b426e2fc77dc90af1e0591a9f51031a6d0)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
catalogue/search.pl