agungjk / phpdotenv-for-codeigniter

Loads environment variables from `.env` to `getenv()` automagically.
MIT License
103 stars 47 forks source link

ENVIRONMENT required. Needs fallback #2

Open petehalverson opened 6 years ago

petehalverson commented 6 years ago

The ENVIRONMENT constant you're referencing ( https://github.com/agungjk/phpdotenv-for-codeigniter/blob/master/system/dotenv/Dotenv.php#L29) may not be defined. I think Dotenv should fall back to a standard .env if that's the case.

petehalverson commented 6 years ago

I should mention I'm using this with a pretty old version of CodeIgniter (v1.7.3), maybe the ENVIRONMENT constant is defined as part of newer convention.

agungjk commented 6 years ago

@petehalverson sory for that, i didn't test on that version before just create a pull, i will merge this issue