fix: use numeric values within range for debug level setting
parent
9b92f86627
commit
54e4fca637
|
@ -25,7 +25,7 @@ return [
|
|||
* Development Mode:
|
||||
* true: Errors and warnings shown.
|
||||
*/
|
||||
'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
|
||||
'debug' => filter_var(env('DEBUG', 0), FILTER_VALIDATE_INT, array("options" => array("min_range"=>0, "max_range"=>1))),
|
||||
|
||||
/*
|
||||
* Security and encryption configuration
|
||||
|
|
|
@ -346,11 +346,11 @@ class CerebrateSettingsProvider extends BaseSettingsProvider
|
|||
'description' => __('The debug level of the instance'),
|
||||
'default' => 0,
|
||||
'options' => [
|
||||
false => __('Debug Off'),
|
||||
true => __('Debug On'),
|
||||
0 => __('Debug Off'),
|
||||
1 => __('Debug On'),
|
||||
],
|
||||
'test' => function ($value, $setting, $validator) {
|
||||
$validator->range('value', [0, 2]);
|
||||
$validator->range('value', [0, 1]);
|
||||
return testValidator($value, $validator);
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue