Skip to content

Commit 262446c

Browse files
igrybkovle0n4eg
authored andcommitted
MAGETWO-69036: Lazy-loaders cause fatal errors in production mode on cloud
1 parent 356cd9b commit 262446c

File tree

1 file changed

+3
-7
lines changed
  • lib/internal/Magento/Framework/App/Utility

1 file changed

+3
-7
lines changed

lib/internal/Magento/Framework/App/Utility/Files.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
use Magento\Framework\App\ObjectManager;
99
use Magento\Framework\Component\ComponentRegistrar;
1010
use Magento\Framework\Component\DirSearch;
11-
use Magento\Framework\View\Design\Theme\ThemePackageList;
1211
use Magento\Framework\Filesystem\Glob;
12+
use Magento\Framework\View\Design\Theme\ThemePackageList;
1313

1414
/**
1515
* A helper to gather specific kind of files in Magento application
@@ -992,12 +992,8 @@ protected function _accumulateFilesByPatterns(array $patterns, $filePattern, arr
992992
protected function _parseModuleStatic($file)
993993
{
994994
foreach ($this->componentRegistrar->getPaths(ComponentRegistrar::MODULE) as $moduleName => $modulePath) {
995-
if (preg_match(
996-
'/^' . preg_quote("{$modulePath}/", '/') . 'view\/([a-z]+)\/web\/(.+)$/i',
997-
$file,
998-
$matches
999-
) === 1
1000-
) {
995+
$pattern = '/^' . preg_quote("{$modulePath}/", '/') . 'view\/([a-z]+)\/web\/(.+)$/i';
996+
if (preg_match($pattern,$file,$matches) === 1) {
1001997
list(, $area, $filePath) = $matches;
1002998
return [$area, '', '', $moduleName, $filePath, $file];
1003999
}

0 commit comments

Comments
 (0)