Skip to content

Commit 471e050

Browse files
author
Dmitry Kologrivov
committed
Pr-42: Fix reading design config
1 parent 96416b1 commit 471e050

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Magento\Framework\Filesystem;
1212
use Magento\Framework\View\DesignInterface;
1313
use Magento\Framework\App\Filesystem\DirectoryList;
14+
use Symfony\Component\Config\Definition\Exception\Exception;
1415

1516
class FileResolver implements \Magento\Framework\Config\FileResolverInterface
1617
{
@@ -76,9 +77,14 @@ public function get($filename, $scope)
7677
. '/'
7778
. $this->themePath
7879
. '/etc/view.xml';
79-
$designDom = new \DOMDocument;
80-
$designDom->load($designPath);
81-
$iterator[$designPath] = $designDom->saveXML();
80+
if (file_exists($designPath)) {
81+
try {
82+
$designDom = new \DOMDocument;
83+
$designDom->load($designPath);
84+
$iterator[$designPath] = $designDom->saveXML();
85+
} catch (Exception $e) {
86+
}
87+
}
8288
break;
8389
default:
8490
$iterator = $this->iteratorFactory->create([]);

0 commit comments

Comments
 (0)