Skip to content

Commit 1bee357

Browse files
committed
Allow set json_flags and hidden_inputs via config
1 parent b5cbc9b commit 1bee357

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/App.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,12 @@ protected static function setExceptionHandler(string $instance) : ExceptionHandl
639639
if (isset($config['show_log_id'])) {
640640
$service->setShowLogId($config['show_log_id']);
641641
}
642+
if (isset($config['json_flags'])) {
643+
$service->setJsonFlags($config['json_flags']);
644+
}
645+
if (isset($config['hidden_inputs']) && $config['hidden_inputs'] !== []) {
646+
$service->setHiddenInputs(...$config['hidden_inputs']);
647+
}
642648
return static::setService('exceptionHandler', $service, $instance);
643649
}
644650

tests/configs/exceptionHandler.config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
'initialize' => true,
1818
'search_engine' => 'bing',
1919
'show_log_id' => true,
20+
'json_flags' => \JSON_PRETTY_PRINT | \JSON_THROW_ON_ERROR,
21+
'hidden_inputs' => ['$_ENV'],
2022
'logger_instance' => 'default',
2123
'language_instance' => 'default',
2224
],

0 commit comments

Comments
 (0)