Fixes create backend php strict notice

fixes #4940
This commit is contained in:
Marius Hein 2013-10-22 12:31:28 +02:00
parent 8efb465eee
commit 80fefe27dc
1 changed files with 7 additions and 1 deletions

View File

@ -149,7 +149,13 @@ class Backend implements ConfigAwareFactory, DatasourceInterface
$name = self::getDefaultBackendName();
}
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)) {