We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51732df commit 456c1aaCopy full SHA for 456c1aa
app/code/core/Mage/Core/Helper/EnvironmentConfigLoader.php
@@ -306,6 +306,9 @@ public function setEnvStore(array $envStorage): void
306
public function getEnv(): array
307
{
308
if (empty($this->envStore)) {
309
+ // Use $_ENV instead of getenv() because phpdotenv populates $_ENV with both system environment variables
310
+ // and variables from the .env file. This ensures that configuration overrides from .env are respected.
311
+ // getenv() would only return system environment variables, not those loaded from .env.
312
$env = array_filter($_ENV, function ($key) {
313
return str_starts_with($key, self::ENV_STARTS_WITH);
314
}, ARRAY_FILTER_USE_KEY);
0 commit comments