File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed
lib/internal/Magento/Framework/Module Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,11 @@ private function getFiles($filename, $subDir = '')
124124 {
125125 $ result = [];
126126 foreach ($ this ->modulesList ->getNames () as $ moduleName ) {
127- $ moduleSubDir = $ this ->getModuleDir ($ subDir , $ moduleName );
127+ try {
128+ $ moduleSubDir = $ this ->getModuleDir ($ subDir , $ moduleName );
129+ } catch (\InvalidArgumentException $ e ) {
130+ continue ;
131+ }
128132 $ file = $ moduleSubDir . '/ ' . $ filename ;
129133 $ directoryRead = $ this ->readFactory ->create ($ moduleSubDir );
130134 $ path = $ directoryRead ->getRelativePath ($ file );
Original file line number Diff line number Diff line change 77
88use Magento \Framework \App \DeploymentConfig ;
99use Magento \Framework \Config \ConfigOptionsListConstants ;
10- use Magento \Framework \Module \ModuleList \Loader ;
1110
1211/**
1312 * A list of modules in the Magento application
@@ -27,7 +26,7 @@ class ModuleList implements ModuleListInterface
2726 /**
2827 * Loader of module information from source code
2928 *
30- * @var Loader
29+ * @var ModuleList\ Loader
3130 */
3231 private $ loader ;
3332
@@ -51,9 +50,9 @@ class ModuleList implements ModuleListInterface
5150 * Constructor
5251 *
5352 * @param DeploymentConfig $config
54- * @param Loader $loader
53+ * @param ModuleList\ Loader $loader
5554 */
56- public function __construct (DeploymentConfig $ config , Loader $ loader )
55+ public function __construct (DeploymentConfig $ config , ModuleList \ Loader $ loader )
5756 {
5857 $ this ->config = $ config ;
5958 $ this ->loader = $ loader ;
@@ -99,17 +98,10 @@ public function getOne($name)
9998 public function getNames ()
10099 {
101100 $ this ->loadConfigData ();
102-
103- $ modulesList = array_keys ($ this ->loader ->load ());
104-
105101 if (!$ this ->configData ) {
106102 return [];
107103 }
108-
109- $ modulesInConfig = array_keys (array_filter ($ this ->configData ));
110-
111- $ result = array_intersect ($ modulesInConfig , $ modulesList );
112-
104+ $ result = array_keys (array_filter ($ this ->configData ));
113105 return $ result ;
114106 }
115107
You can’t perform that action at this time.
0 commit comments