Skip to content
Snippets Groups Projects
Commit 30217973 authored by Romanos Dodopoulos's avatar Romanos Dodopoulos
Browse files

Do not hide Drupal core from the update manager

We wanted to hide Drupal core from the update manager so people are not
notified when there is a Drupal core security update. This works well if
there is no local module. It just prints the following warning:

```
Warning: Invalid argument supplied for foreach() in
template_preprocess_update_report() (line 44 of
/drupal/8.4.5/core/modules/update/update.report.inc) #0
/drupal/8.4.5/core/includes/boot
```

This is the case when using, for instance, the
update_notifications_disable module which the only thing that it does
is:
```
function update_notifications_disable_update_projects_alter(&$projects)
{
  $projects = [];
}
```

Unfortunately, by only disabling centrally managed modules, when there
is a local module installed there is the following error:

```
Notice: Undefined index: drupal in update_requirements() (line 37 of
/drupal/8.4.5/core/modules/update/update.install) #0
/drupal/8.4.5/core/includes/bootstrap.inc(566): _drupal_error_hand
```

That error causes the email notification to be sent. For D8 it does not
state that there is a problem with checking the available updates like
it does for D7. So users get emails that there are available updates
although there is none.

We need to revert that unset until we find a better solution.
parent 46e7dd86
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ function cern_integration_form_alter(&$form, \Drupal\Core\Form\FormStateInterfac
function cern_integration_update_projects_alter(&$projects)
{
// Remove Drupal core.
unset($projects['drupal']);
// unset($projects['drupal']);
// Remove all centrally managed modules.
foreach (system_get_info("module") as $module_name => $module) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment