From 041028e04ceb453371e3d0897b8cece12e66529c Mon Sep 17 00:00:00 2001 From: Jeroen Pinoy Date: Sat, 23 Nov 2024 20:27:00 +0100 Subject: [PATCH] fix: migrations not working on install due to debug mode not being boolean --- config/app_local.example.php | 2 +- .../Table/SettingProviders/CerebrateSettingsProvider.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/app_local.example.php b/config/app_local.example.php index 6b5e208..ed0c5ec 100644 --- a/config/app_local.example.php +++ b/config/app_local.example.php @@ -25,7 +25,7 @@ return [ * Development Mode: * true: Errors and warnings shown. */ - 'debug' => filter_var(env('DEBUG', 0), FILTER_VALIDATE_INT, array("options" => array("min_range"=>0, "max_range"=>1))), + 'debug' => filter_var(env('DEBUG', false), FILTER_VALIDATE_BOOLEAN), /* * Security and encryption configuration diff --git a/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php b/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php index 04e5590..42b2e41 100644 --- a/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php +++ b/src/Model/Table/SettingProviders/CerebrateSettingsProvider.php @@ -346,8 +346,8 @@ class CerebrateSettingsProvider extends BaseSettingsProvider 'description' => __('The debug level of the instance'), 'default' => 0, 'options' => [ - 0 => __('Debug Off'), - 1 => __('Debug On'), + false => __('Debug Off'), + true => __('Debug On'), ], 'test' => function ($value, $setting, $validator) { $validator->range('value', [0, 1]);