Skip to content

Commit 6fcf5d0

Browse files
authored
Merge pull request #183 from Wachizungu/fix-debug-setting-warnings
fix: use numeric values within range for debug level setting
2 parents 9b92f86 + 54e4fca commit 6fcf5d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

config/app_local.example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Development Mode:
2626
* true: Errors and warnings shown.
2727
*/
28-
'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN),
28+
'debug' => filter_var(env('DEBUG', 0), FILTER_VALIDATE_INT, array("options" => array("min_range"=>0, "max_range"=>1))),
2929

3030
/*
3131
* Security and encryption configuration

src/Model/Table/SettingProviders/CerebrateSettingsProvider.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,11 @@ protected function generateSettingsConfiguration()
346346
'description' => __('The debug level of the instance'),
347347
'default' => 0,
348348
'options' => [
349-
false => __('Debug Off'),
350-
true => __('Debug On'),
349+
0 => __('Debug Off'),
350+
1 => __('Debug On'),
351351
],
352352
'test' => function ($value, $setting, $validator) {
353-
$validator->range('value', [0, 2]);
353+
$validator->range('value', [0, 1]);
354354
return testValidator($value, $validator);
355355
},
356356
],

0 commit comments

Comments
 (0)