Skip to content

Commit

Permalink
Merge pull request #183 from Wachizungu/fix-debug-setting-warnings
Browse files Browse the repository at this point in the history
fix: use numeric values within range for debug level setting
  • Loading branch information
iglocska authored Nov 23, 2024
2 parents 9b92f86 + 54e4fca commit 6fcf5d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/app_local.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ protected function generateSettingsConfiguration()
'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);
},
],
Expand Down

0 comments on commit 6fcf5d0

Please sign in to comment.