Skip to content

Commit

Permalink
Auto initialize exceptions handler
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Dec 29, 2021
1 parent 473d7d8 commit 635e0a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ public static function exceptions(string $instance = 'default') : ExceptionHandl
if (isset($config['views_dir'])) {
$service->setViewsDir($config['views_dir']);
}
if (isset($config['initialize']) && $config['initialize'] === true) {
$config['initialize'] ??= true;
if ($config['initialize'] === true) {
$service->initialize($config['handle_errors'] ?? true);
}
return static::setService('exceptions', $service, $instance);
Expand Down

0 comments on commit 635e0a5

Please sign in to comment.