Commit ed373eda authored by Hendrik Heneke's avatar Hendrik Heneke
Browse files

Check existence of .env file.

parent c85bb69e
Pipeline #374 passed with stage
in 35 seconds
......@@ -81,7 +81,12 @@ class Factory
if (is_array($env = @include $this->projectDir . '/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
(new Dotenv(false))->populate($env);
} else {
(new Dotenv(false))->loadEnv($this->projectDir . '/.env');
$dotenvFile = $this->projectDir . '/.env';
if (file_exists($dotenvFile)) {
(new Dotenv(false))->loadEnv($dotenvFile);
} else {
// TODO: log?
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment