Bug 12478 - fix error in configuration loading

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Robin Sheat 2014-11-19 14:07:20 +13:00 committed by Brendan Gallagher
parent 90efe994c9
commit 90c49a01fe

View file

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