Bugzilla – Attachment 183992 Details for
Bug 40351
Koha/SearchEngine/Elasticsearch/Search.t generates a warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40351: Remove warning from oha/SearchEngine/Elasticsearch/Search.t
Bug-40351-Remove-warning-from-ohaSearchEngineElast.patch (text/plain), 2.01 KB, created by
Jonathan Druart
on 2025-07-11 12:50:57 UTC
(
hide
)
Description:
Bug 40351: Remove warning from oha/SearchEngine/Elasticsearch/Search.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-07-11 12:50:57 UTC
Size:
2.01 KB
patch
obsolete
>From a9d6720d4a313ef35a1621c820b0f7e15d385d93 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 11 Jul 2025 14:49:32 +0200 >Subject: [PATCH] Bug 40351: Remove warning from > oha/SearchEngine/Elasticsearch/Search.t > >Use of uninitialized value in string comparison (cmp) at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Search.pm line 536. > >I think this is the correct fix. We generate a random av category that >is used in the data, so $label get undef: >521 $label = $authorised_values{$t}; >--- > Koha/SearchEngine/Elasticsearch/Search.pm | 4 ++-- > t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm >index c88345bb582..64fce64de5d 100644 >--- a/Koha/SearchEngine/Elasticsearch/Search.pm >+++ b/Koha/SearchEngine/Elasticsearch/Search.pm >@@ -526,8 +526,8 @@ sub _convert_facets { > facet_count => $c, > facet_link_value => $t, > facet_title_value => $t, >- facet_label_value => $label, # TODO either truncate this, >- # or make the template do it like it should anyway >+ facet_label_value => $label || q{}, # TODO either truncate this, >+ # or make the template do it like it should anyway > type_link_value => $type, > }; > } >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >index 5e71ba5f313..d5b8790abeb 100755 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t >@@ -17,7 +17,8 @@ > > use Modern::Perl; > >-use Test::More tests => 14; >+use Test::More tests => 15; >+use Test::NoWarnings; > use t::lib::Mocks; > use t::lib::TestBuilder; > >-- >2.34.1
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 40351
:
183992
|
184028