Skip to content

Commit bde45ec

Browse files
MAGETWO-94349: The "recursion detected" error during a deployment
1 parent b1ce314 commit bde45ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Config/App/Config/Type/System.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,11 @@ public function get($path = '')
155155
}
156156
$scopeId = array_shift($pathParts);
157157
if (!isset($this->data[$scopeType][$scopeId])) {
158-
$this->data = array_replace_recursive($this->loadScopeData($scopeType, $scopeId), $this->data);
158+
$scopeData = $this->loadScopeData($scopeType, $scopeId);
159+
/* Starting from 2.2.0 $this->data can be already loaded with $this->loadScopeData */
160+
if (!isset($this->data[$scopeType][$scopeId])) {
161+
$this->data = array_replace_recursive($scopeData, $this->data);
162+
}
159163
}
160164
return isset($this->data[$scopeType][$scopeId])
161165
? $this->getDataByPathParts($this->data[$scopeType][$scopeId], $pathParts)

0 commit comments

Comments
 (0)