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 = '')
124
124
{
125
125
$ result = [];
126
126
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
+ }
128
132
$ file = $ moduleSubDir . '/ ' . $ filename ;
129
133
$ directoryRead = $ this ->readFactory ->create ($ moduleSubDir );
130
134
$ path = $ directoryRead ->getRelativePath ($ file );
Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Framework \App \DeploymentConfig ;
9
9
use Magento \Framework \Config \ConfigOptionsListConstants ;
10
- use Magento \Framework \Module \ModuleList \Loader ;
11
10
12
11
/**
13
12
* A list of modules in the Magento application
@@ -27,7 +26,7 @@ class ModuleList implements ModuleListInterface
27
26
/**
28
27
* Loader of module information from source code
29
28
*
30
- * @var Loader
29
+ * @var ModuleList\ Loader
31
30
*/
32
31
private $ loader ;
33
32
@@ -51,9 +50,9 @@ class ModuleList implements ModuleListInterface
51
50
* Constructor
52
51
*
53
52
* @param DeploymentConfig $config
54
- * @param Loader $loader
53
+ * @param ModuleList\ Loader $loader
55
54
*/
56
- public function __construct (DeploymentConfig $ config , Loader $ loader )
55
+ public function __construct (DeploymentConfig $ config , ModuleList \ Loader $ loader )
57
56
{
58
57
$ this ->config = $ config ;
59
58
$ this ->loader = $ loader ;
@@ -99,17 +98,10 @@ public function getOne($name)
99
98
public function getNames ()
100
99
{
101
100
$ this ->loadConfigData ();
102
-
103
- $ modulesList = array_keys ($ this ->loader ->load ());
104
-
105
101
if (!$ this ->configData ) {
106
102
return [];
107
103
}
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 ));
113
105
return $ result ;
114
106
}
115
107
You can’t perform that action at this time.
0 commit comments