Browse Source

Fixes callable throwing RuntimeException

bravo-kernel 11 years ago
parent
commit
a2c5ea6ce1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/Log/LogEngineRegistry.php

+ 4 - 0
src/Log/LogEngineRegistry.php

@@ -66,6 +66,10 @@ class LogEngineRegistry extends ObjectRegistry {
  * @throws \RuntimeException when an object doesn't implement the correct interface.
  */
 	protected function _create($class, $alias, $settings) {
+		if (is_callable($class)) {
+			$class = $class();
+		}
+
 		if (is_object($class)) {
 			$instance = $class;
 		}