mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 01:10:42 +08:00
Fix .env.local.php error in bootstrap.php
This commit is contained in:
parent
a549d23644
commit
32182ee1c5
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ require_once dirname(__DIR__) . '/vendor/autoload.php';
|
|||
|
||||
// Load cached env vars if the .env.local.php file exists
|
||||
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
|
||||
if (is_array($env = @include dirname(__DIR__) . '/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
|
||||
$envLocalPath = dirname(__DIR__) . '/.env.local.php';
|
||||
if ((is_file($envLocalPath) && is_array($env = @include $envLocalPath)) && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
|
||||
foreach ($env as $k => $v) {
|
||||
$_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue