-
-
Notifications
You must be signed in to change notification settings - Fork 70
Description
Describe the bug
Getting a warning "Undefined array key "APP_ENV" from
PHP Warning: Undefined array key "APP_ENV" in /Users/user/Desktop/new-app/vendor/leafs/mvc-core/src/Core.php on line 527
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
-
leaf create my-app --mvc
-
cd my-app
php leaf serve -
Page Loads with Warning:
Undefined array key "APP_ENV" in /Users/user/Desktop/new-app/vendor/leafs/mvc-core/src/Core.php on line 527
I see another closed issue similar to this.
I've followed the steps in that issue by running composer update and replacing the index.php with the code supplied. Im not sure what is happening. However, if I add an isset, the warning goes away.
Core.php line 527
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] !== 'production')