From c1e7e93d81634e8c10a36e2ec730fba20de2c813 Mon Sep 17 00:00:00 2001 From: David Cook Date: Sun, 16 Sep 2018 18:26:17 +0000 Subject: [PATCH] Bug 18585: Missing triplestore configuration causes warnings in logs This patch checks that the triplestore configuration is defined before trying to find it and read it. Signed-off-by: Josef Moravec --- C4/Context.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index 35231d799f..0376cd01ed 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -777,7 +777,7 @@ sub triplestore { my $triplestore = ( $context->{triplestore} && $context->{triplestore}->{$name} ) ? $context->{triplestore}->{$name} : undef; if ( ! $triplestore ){ my $config_file = $context->config('triplestore_config'); - if ( -f $config_file ){ + if ( $config_file && -f $config_file ){ my $config = YAML::LoadFile($config_file); if ($config && $name){ my $new_triplestore = $self->_new_triplestore($config,$name); -- 2.11.0