Skip to content

Commit 5a2c176

Browse files
MAGETWO-15371: view.xml file inheritance not working properly
1 parent b5f55f1 commit 5a2c176

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/internal/Magento/Framework/Config/FileResolver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public function getParents($filename, $scope)
138138
try {
139139
$iterator = $this->getParentConfigs($this->currentTheme, []);
140140

141-
ksort($iterator);
142141
} catch (\Exception $e) {
143142
throw new \Magento\Framework\Exception\LocalizedException(
144143
new \Magento\Framework\Phrase('Could not read config file')

lib/internal/Magento/Framework/Config/View.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ public function read($scope = null)
222222
$scope = $scope ?: $this->_defaultScope;
223223
$result = [];
224224

225-
foreach ($this->_fileResolver->getParents($this->_fileName, $scope) as $parent) {
225+
$parents = (array)$this->_fileResolver->getParents($this->_fileName, $scope);
226+
// Sort parents desc
227+
krsort($parents);
228+
229+
foreach ($parents as $parent) {
226230
$result = array_replace_recursive($result, $this->_readFiles([$parent]));
227231
}
228232

0 commit comments

Comments
 (0)