Skip to content
Snippets Groups Projects

Catch exception and return if the project is not installed or can't be found

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
+ 7
0
@@ -79,6 +79,13 @@ function composer_deploy_preprocess_update_project_status(&$variables) {
if (empty($variables['versions'])) {
return;
}
try {
$projectData = \Drupal::service('extension.list.' . $project_type)->getExtensionInfo($variables['project']['name']);
} catch (Exception $e) {
return;
}
$project_type = $variables['project']['project_type'];
if (!in_array($project_type, ['module', 'theme'])) {
return;
Loading