From 90c49a01fee1bddac41a6563ae1ef4c5db657545 Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Wed, 19 Nov 2014 14:07:20 +1300 Subject: [PATCH] Bug 12478 - fix error in configuration loading Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher --- Koha/ElasticSearch.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/ElasticSearch.pm b/Koha/ElasticSearch.pm index 4223b92767..bc8d06e49c 100644 --- a/Koha/ElasticSearch.pm +++ b/Koha/ElasticSearch.pm @@ -86,8 +86,9 @@ sub get_elasticsearch_params { my ($self) = @_; # Copy the hash so that we're not modifying the original - my $es = { %{ C4::Context->config('elasticsearch') } }; - die "No 'elasticsearch' block is defined in koha-conf.xml.\n" if ( !$es ); + my $conf = C4::Context->config('elasticsearch'); + die "No 'elasticsearch' block is defined in koha-conf.xml.\n" if ( !$conf ); + my $es = { %{ $conf } }; # Helpfully, the multiple server lines end up in an array for us anyway # if there are multiple ones, but not if there's only one. -- 2.39.5