Skip to content

Commit 908a67c

Browse files
author
Igor Miniailo
committed
Fixed MAGETWO-44938: Products aren't shown on frontend
1 parent c0fdc2e commit 908a67c

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

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

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,22 @@ public function get($filename, $scope)
9696
$themeConfigFile
9797
)
9898
);
99-
}
100-
$designPath =
101-
$this->componentRegistrar->getPath(
102-
ComponentRegistrar::THEME,
103-
$this->area . '/' . $this->themePath
104-
) . '/etc/view.xml';
105-
if (file_exists($designPath)) {
106-
try {
107-
$designDom = new \DOMDocument;
108-
$designDom->load($designPath);
109-
$iterator[$designPath] = $designDom->saveXML();
110-
} catch (\Exception $e) {
111-
throw new \Magento\Framework\Exception\LocalizedException(
112-
new \Magento\Framework\Phrase('Could not read config file')
113-
);
99+
} else {
100+
$designPath =
101+
$this->componentRegistrar->getPath(
102+
ComponentRegistrar::THEME,
103+
$this->area . '/' . $this->themePath
104+
) . '/etc/view.xml';
105+
if (file_exists($designPath)) {
106+
try {
107+
$designDom = new \DOMDocument;
108+
$designDom->load($designPath);
109+
$iterator[$designPath] = $designDom->saveXML();
110+
} catch (\Exception $e) {
111+
throw new \Magento\Framework\Exception\LocalizedException(
112+
new \Magento\Framework\Phrase('Could not read config file')
113+
);
114+
}
114115
}
115116
}
116117
break;

0 commit comments

Comments
 (0)