Welcome Guest, Not a member yet? Register   Sign In
No DBDebug - what's going on with .env variables???
#1

(This post was last modified: 01-11-2021, 03:41 AM by tgix.)

I have started to get serious problems with settings from .env not picked up by CI4. 
Just now I stopped getting exceptions thrown on Database errors due to the setting in app/config/Database.php:
PHP Code:
public $default = [
    // ...
    'DBDebug'  => (ENVIRONMENT !== 'production'),
    // ...
]; 
In my .env I have set CI_ENVIRONMENT = development but still if I do a die(ENVIRONMENT) in app/config/Database.php::__construct I get "production" and thus DBDebug = false and thus I have unnoticed bugs in my code.

This happens on PHP 7.3.26 now both in CLI and in Apache. Running on macOS 10.15.7 installed via homebrew.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB