Problem/Motivation

The Update Status plugin checks for e-mail addresses. When no addresses are set, it logs a warning, because the final mail check doesn't test if there's a result.

Warning: foreach() argument must be of type array|object, null given in Drupal\vitals_extra\Plugin\VitalsCheck\UpdateStatus->getData() (regel 42 van /app/www/modules/contrib/vitals_extra/src/Plugin/VitalsCheck/UpdateStatus.php)

Steps to reproduce

Enable the Update status plugin, check the vitals endpoint, then check the logs for the PHP warning.

Proposed resolution

Add extra test on last check.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tijsdeboeck created an issue. See original summary.

tijsdeboeck’s picture

Fixed issue + added extra functionality to add all e-mails from the update settings and symfony mailer sources to array instead of replacing the array with emails from last checked source.

tijsdeboeck’s picture

Simple fix, so merging it...

  • tijsdeboeck committed 1a01e004 on 1.x
    Issue #3384922: UpdateStatus throws warning when there are no e-mail...
tijsdeboeck’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.