Skip to content

Commit cfe522f

Browse files
committed
ACP2E-2198: fix scenario where configs are not reloaded
1 parent 0a834cc commit cfe522f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lib/internal/Magento/Framework/App/DeploymentConfig.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class DeploymentConfig
6161
*/
6262
private $readerLoad = [];
6363

64+
/**
65+
* @var array
66+
*/
67+
private $noConfigData = [];
68+
6469
/**
6570
* Constructor
6671
*
@@ -94,9 +99,17 @@ public function get($key = null, $defaultValue = null)
9499
}
95100
$result = $this->getByKey($key);
96101
if ($result === null) {
97-
if (empty($this->flatData) || count($this->getAllEnvOverrides())) {
102+
if (empty($this->flatData)
103+
|| !isset($this->flatData[$key]) && !isset($this->noConfigData[$key])
104+
|| count($this->getAllEnvOverrides())
105+
) {
106+
$this->resetData();
98107
$this->reloadData();
99108
}
109+
110+
if (!isset($this->flatData[$key])) {
111+
$this->noConfigData[$key] = $key;
112+
}
100113
$result = $this->getByKey($key);
101114
}
102115
return $result ?? $defaultValue;

0 commit comments

Comments
 (0)