Skip to content

Commit

Permalink
Merge pull request #11 from NeoBlack/develop
Browse files Browse the repository at this point in the history
[BUGFIX] Fix broken .env detection
  • Loading branch information
susannemoog committed Jul 28, 2017
2 parents cad0a89 + 1f770db commit 7b86383
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bootstrap.php
Expand Up @@ -12,9 +12,9 @@
// env config
// Determine the .env file in package directory ($baseBath === __DIR__) and getcwd()
// this prevent path errors in case of global composer installation and package requirement
foreach([$basePath . DIRECTORY_SEPARATOR . '.env', getcwd() . DIRECTORY_SEPARATOR . '.env'] as $file) {
if (file_exists($file)) {
$dotenv = new Dotenv\Dotenv($basePath);
foreach([$basePath, getcwd()] as $directory) {
if (file_exists($directory . DIRECTORY_SEPARATOR . '.env')) {
$dotenv = new Dotenv\Dotenv($directory);
$dotenv->load();
break;
}
Expand Down

0 comments on commit 7b86383

Please sign in to comment.