Fix debug mode setting (#7345)

* Debug Mode - Always enabled #477

* Debug Mode - Always enabled #477

* Debug Mode - Always enabled #477
This commit is contained in:
Gevorg Mansuryan 2024-12-15 05:26:50 +04:00 committed by GitHub
parent 18cf39f092
commit c231e5c309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ HumHub Changelog
- Enh #7339: Add `DeviceDetectorHelper::isMultiInstanceApp()` method to detect if the app is running in a multi-instance mode
- Enh #7342: Mask .env `DB__PASSWORD` variable in logs
- Enh #7344: Disable editing Base URL when setting is fixed
- Fix #7345: Fix debug mode setting in .env
1.17.0-beta.2 (November 12, 2024)
---------------------------------

View File

@ -12,7 +12,7 @@ $dotenv = Dotenv\Dotenv::createImmutable(__DIR__, '.env');
$dotenv->safeLoad();
$dynamicConfig = (is_readable(__DIR__ . '/protected/config/dynamic.php')) ? require(__DIR__ . '/protected/config/dynamic.php') : [];
$debug = !!($_ENV['HUMHUB_DEBUG'] ?? false) || !($dynamicConfig['params']['installed'] ?? false);
$debug = filter_var($_ENV['HUMHUB_DEBUG'] ?? false, FILTER_VALIDATE_BOOLEAN) || !filter_var($dynamicConfig['params']['installed'] ?? false, FILTER_VALIDATE_BOOLEAN);
defined('YII_DEBUG') or define('YII_DEBUG', $debug);
defined('YII_ENV') or define('YII_ENV', $debug ? 'dev' : 'prod');

View File

@ -13,7 +13,7 @@ $dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../', '.env');
$dotenv->safeLoad();
$dynamicConfig = (is_readable(__DIR__ . '/config/dynamic.php')) ? require(__DIR__ . '/config/dynamic.php') : [];
$debug = !!($_ENV['HUMHUB_DEBUG'] ?? false) || !($dynamicConfig['params']['installed'] ?? false);
$debug = filter_var($_ENV['HUMHUB_DEBUG'] ?? false, FILTER_VALIDATE_BOOLEAN) || !filter_var($dynamicConfig['params']['installed'] ?? false, FILTER_VALIDATE_BOOLEAN);
defined('YII_DEBUG') or define('YII_DEBUG', $debug);