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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Just make sure to use the proper coding standard with if/else. :)

rfay’s picture

Oops. Thanks, @davereid. Here's the replacement.

Note that this fix should be made in D7 as well.

ilo’s picture

Reviewed, patched, tested, and committed to DRUPAL-6--1. Thank you all!

ilo’s picture

Version: 6.x-1.x-dev »
Status: Needs review » Fixed

and committed also for D7

Status: Fixed » Closed (fixed)

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