From 75259517c3d0c7b6ee9308e33b543998828b3b42 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. --- C4/Context.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Context.pm b/C4/Context.pm index 35231d7..0376cd0 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.1.4