From 80fefe27dc4a4828d376ca968e586aad34368de4 Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Tue, 22 Oct 2013 12:31:28 +0200 Subject: [PATCH] Fixes create backend php strict notice fixes #4940 --- modules/monitoring/library/Monitoring/Backend.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend.php b/modules/monitoring/library/Monitoring/Backend.php index a9d1f41a9..500666f54 100644 --- a/modules/monitoring/library/Monitoring/Backend.php +++ b/modules/monitoring/library/Monitoring/Backend.php @@ -149,7 +149,13 @@ class Backend implements ConfigAwareFactory, DatasourceInterface $name = self::getDefaultBackendName(); } - $config = self::$backendConfigs[$name]; + if (isset(self::$backendConfigs[$name])) { + $config = self::$backendConfigs[$name]; + } else { + throw new ConfigurationError( + 'No configuration for backend' . $name + ); + } self::$backendInstances[$name] = $backend = new self($config, ResourceFactory::getResourceConfig($config->resource)); switch (strtolower($config->type)) {