Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Even though it's incorrect, many modules do not create the body as an array.
Thus the hook_mail_alter() code that says
$message['body'][] = ".... signature added";
produces a fatal error.
This patch makes the code a bit more generous.
Comment | File | Size | Author |
---|---|---|---|
#2 | examples.body_as_string_653504_02.patch | 895 bytes | rfay |
examples.body_as_string.patch | 892 bytes | rfay | |
Comments
Comment #1
Dave ReidJust make sure to use the proper coding standard with if/else. :)
Comment #2
rfayOops. Thanks, @davereid. Here's the replacement.
Note that this fix should be made in D7 as well.
Comment #3
ilo CreditAttribution: ilo commentedReviewed, patched, tested, and committed to DRUPAL-6--1. Thank you all!
Comment #4
ilo CreditAttribution: ilo commentedand committed also for D7