Skip to content

Commit ac91b3d

Browse files
committed
ACP2E-1512: Env variable config not working for store views with capital letters in the code
fixed disabled "use system value" issue
1 parent 1541ec8 commit ac91b3d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/Config/Model/Config/Reader/Source/Deployed/SettingChecker.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ public function getPlaceholderValue($path, $scope, $scopeCode = null)
102102
public function getEnvValue($placeholder)
103103
{
104104
// phpcs:disable Magento2.Security.Superglobal
105-
if ($this->placeholder->isApplicable($placeholder) && isset($_ENV[$placeholder])) {
106-
return $_ENV[$placeholder];
105+
$environment = [];
106+
foreach ($_ENV as $key => $value) {
107+
$environment[strtolower($key)] = $value;
108+
}
109+
if ($this->placeholder->isApplicable($placeholder) && isset($environment[strtolower($placeholder)])) {
110+
return $environment[strtolower($placeholder)];
107111
}
108112
// phpcs:enable
109113

0 commit comments

Comments
 (0)