From e0f6450ae9887f7282c3813e2c3d1f2c6bb12593 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 Apr 2018 15:12:20 -0300 Subject: [PATCH] Bug 20073: Remove perlcritic error "return" statement with explicit "undef" at line 245, column 5. See page 199 of PBP. (Severity: 5) Signed-off-by: Kyle M Hall Signed-off-by: Nick Clemens --- Koha/SearchEngine/Elasticsearch.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch.pm b/Koha/SearchEngine/Elasticsearch.pm index 04ec0d948e..9c114fb060 100644 --- a/Koha/SearchEngine/Elasticsearch.pm +++ b/Koha/SearchEngine/Elasticsearch.pm @@ -165,7 +165,7 @@ sub get_elasticsearch_mappings { if (!defined $all_mappings{$self->index}) { $sort_fields{$self->index} = {}; my $mappings = { - data => _get_elasticsearch_mapping('general', '') + data => scalar _get_elasticsearch_mapping('general', '') }; my $marcflavour = lc C4::Context->preference('marcflavour'); $self->_foreach_mapping( @@ -242,7 +242,7 @@ sub _get_elasticsearch_mapping { if (defined $settings->{$purpose}{'default'}) { return $settings->{$purpose}{'default'}; } - return undef; + return; } sub reset_elasticsearch_mappings { -- 2.39.5