Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
bug #1408 fix lazy evaluation of 'monolog.use_error_handler' (Frank H…
Browse files Browse the repository at this point in the history
…ildebrandt)

This PR was squashed before being merged into the 2.0.x-dev branch (closes #1408).

Discussion
----------

fix lazy evaluation of 'monolog.use_error_handler'

the value of 'debug' could be set after registering the serviceprovider.

Commits
-------

9b84697 fix lazy evaluation of 'monolog.use_error_handler'
  • Loading branch information
fabpot committed Aug 22, 2016
2 parents 183e39a + 9b84697 commit 6c89d86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Silex/Provider/MonologServiceProvider.php
Expand Up @@ -106,7 +106,9 @@ public function register(Container $app)
$app['monolog.permission'] = null;
$app['monolog.exception.logger_filter'] = null;
$app['monolog.logfile'] = null;
$app['monolog.use_error_handler'] = !$app['debug'];
$app['monolog.use_error_handler'] = function ($app) {
return !$app['debug'];
};
}

public function boot(Application $app)
Expand Down

0 comments on commit 6c89d86

Please sign in to comment.