Warning if there are no attachments

Created on 26 November 2024, 27 days ago

Problem/Motivation

Warning if there are no attachments,
Apparently introduced in ✨ Create a way to generically override an email without parameter mapping Active

Steps to reproduce

I've hit that while working on drupal_cms.
Having 41da8b6 from that repo, changing core to 11.x-dev and dashboard to 2.x-dev, and removing the patch in drupal_cms_admin_theme/composer.json, at the end of the installation via drush I saw

 [warning] Warning: Undefined array key "attachments" in Drupal\easy_email_override\Service\MailManager->mail() (line 194 of /var/www/html/web/modules/contrib/easy_email/modules/easy_email_override/src/Service/MailManager.php) #0 /var/www/html/web/core/includes/bootstrap.inc(108): _drupal_error_handler_real()
#1 /var/www/html/web/modules/contrib/easy_email/modules/easy_email_override/src/Service/MailManager.php(194): _drupal_error_handler()
#2 /var/www/html/web/core/modules/update/update.fetch.inc(43): Drupal\easy_email_override\Service\MailManager->mail()

Proposed resolution

Add isset.

Remaining tasks

Review.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

3.0

Component

Email Overrides

Created by

πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024