To recreate: 1 - Be using Elasticsearch 2 - Search on OPAC with dropdown set to 'Library catalog' 3 - Warns in plack-opac-error.log [2021/09/22 12:40:55] [WARN] Use of uninitialized value $f in pattern match (m//) at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 725. [2021/09/22 12:40:55] [WARN] Use of uninitialized value $f in exists at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 731.
Created attachment 125132 [details] [review] Bug 29077: Remove blank indexes before convert To test: 1 - Be using Elasticsearch 2 - Search on OPAC with dropdown set to 'Library catalog' 3 - Warns in plack-opac-error.log 4 - Apply patch 5 - Repeat 6 - No warns 7 - Search returns correct results
@indexes = grep(/.+/, @indexes) This is correct, but in actual code we see much more occurrences of : grep { $_ ne q{} } @array In my opinion it is better.
Created attachment 133515 [details] [review] Bug 29077: Remove blank indexes before convert To test: 1 - Be using Elasticsearch 2 - Search on OPAC with dropdown set to 'Library catalog' 3 - Warns in plack-opac-error.log 4 - Apply patch 5 - Repeat 6 - No warns 7 - Search returns correct results Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Created attachment 133886 [details] [review] Bug 29077: Remove blank indexes before convert To test: 1 - Be using Elasticsearch 2 - Search on OPAC with dropdown set to 'Library catalog' 3 - Warns in plack-opac-error.log 4 - Apply patch 5 - Repeat 6 - No warns 7 - Search returns correct results Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This works, so Passing QA.. but I agree it's a little easier to read in the other form.. happy for that to be an RM follow-up?
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Created attachment 134006 [details] [review] Bug 29077: (follow-up) Use another syntax Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
I use my Gauntlet of Power and snap the syntax ^^
Pushed to 21.11.x for 21.11.06
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.