diff --git a/bb-di.php b/bb-di.php index 3c6befe66..1ab3b20ce 100644 --- a/bb-di.php +++ b/bb-di.php @@ -135,7 +135,7 @@ $di['request'] = function () use ($di) { }; $di['cache'] = function () use ($di) { return new FileCache();}; $di['auth'] = function () use ($di) { return new Box_Authorization($di);}; -$di['twig'] = $di->factory(function () use ($di) { +$di['twig'] = function () use ($di) { $config = $di['config']; $options = $config['twig']; @@ -163,7 +163,7 @@ $di['twig'] = $di->factory(function () use ($di) { $twig->addGlobal('guest', $di['api_guest']); return $twig; -}); +}; $di['is_client_logged'] = function() use($di) { if(!$di['auth']->isClientLoggedIn()) { diff --git a/bb-library/Box/Log.php b/bb-library/Box/Log.php index 2c8f9f7a2..c5729a8fb 100644 --- a/bb-library/Box/Log.php +++ b/bb-library/Box/Log.php @@ -42,7 +42,7 @@ class Box_Log self::DEBUG => 'DEBUG', ); - protected $_min_priority = NULL; + protected $_min_priority = array(); protected $_writers = array(); @@ -120,7 +120,7 @@ class Box_Log } //do not log debug level messages if debug is OFF - if($this->di['config']['debug'] === FALSE && $event['priority'] > self::INFO) { + if($this->_min_priority && $priority > self::INFO) { return ; }