Skip to content

Commit

Permalink
Adjusted so it looks for .env if not load php version
Browse files Browse the repository at this point in the history
  • Loading branch information
jamielsharief committed Aug 30, 2019
1 parent 628e23a commit d59dcdc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,16 @@

require __DIR__ . DS . 'functions.php';

if (file_exists(CONFIG . DS . '.env.php')) {
if (file_exists(CONFIG . DS . '.env')) {
$dotEnv = new Origin\Core\DotEnv();
$dotEnv->load(CONFIG . DS . '.env');
} elseif (file_exists(CONFIG . DS . '.env.php')) {
$result = include CONFIG . DS . '.env.php';
foreach ($result as $key => $value) {
$_ENV[$key] = $value;
}
}

if (file_exists(CONFIG . DS . '.env')) {
$dotEnv = new Origin\Core\DotEnv();
$dotEnv->load(CONFIG . DS . '.env');
}

/**
* Load Config
*/
Expand Down

0 comments on commit d59dcdc

Please sign in to comment.