-
-
Notifications
You must be signed in to change notification settings - Fork 84
Closed
Description
An example is the Mandrill module.
// Load Mandrill library if found in module's /lib directory.
if (file_exists(drupal_get_path('module', 'mandrill') . '/lib/mandrill/src/Mandrill.php')) {
require drupal_get_path('module', 'mandrill') . '/lib/mandrill/src/Mandrill.php';
}
This is due to drupal_get_path
which calls drupal_get_filename
and taps into the service container.
It is fixed with
try {
require $module_dir . '/' . $module->getExtensionFilename();
} catch (\Throwable $e) {
// Something prevent the extension file from loading.
}
Metadata
Metadata
Assignees
Labels
No labels