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};

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d6cbe0a25e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-07-11 14:49:32 +02:00 committed by Paul Derscheid
parent b010fc5d49
commit 9f6088d48b
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
2 changed files with 4 additions and 3 deletions

View File

@ -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,
};
}

View File

@ -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;