File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,11 @@ protected function loadModules(): void
178
178
$ module_dir = $ this ->drupalRoot . '/ ' . $ module ->getPath ();
179
179
// Need to ensure .module is enabled.
180
180
if ($ module ->getExtensionFilename () !== null ) {
181
- require $ module_dir . '/ ' . $ module ->getExtensionFilename ();
181
+ try {
182
+ require $ module_dir . '/ ' . $ module ->getExtensionFilename ();
183
+ } catch (\Throwable $ e ) {
184
+ // Something prevent the extension file from loading.
185
+ }
182
186
}
183
187
// Add .post_update.php
184
188
if (file_exists ($ module_dir . '/ ' . $ module_name . '.post_update.php ' )) {
@@ -209,7 +213,11 @@ protected function loadThemes(): void
209
213
$ theme_dir = $ this ->drupalRoot . '/ ' . $ theme ->getPath ();
210
214
// Need to ensure .theme is enabled.
211
215
if ($ theme ->getExtensionFilename () !== null ) {
212
- require $ theme_dir . '/ ' . $ theme ->getExtensionFilename ();
216
+ try {
217
+ require $ theme_dir . '/ ' . $ theme ->getExtensionFilename ();
218
+ } catch (\Throwable $ e ) {
219
+ // Something prevent the extension file from loading.
220
+ }
213
221
}
214
222
}
215
223
}
You can’t perform that action at this time.
0 commit comments