when rules sends mail with no attachments:

Warning: Invalid argument supplied for foreach() in mimemail_html_body() (Zeile 352 von /home/xl/workspace/sanago/sites/all/modules/mimemail/mimemail.inc).

that line

foreach ($attachments as $a) {

gets a string served.

Comments

geek-merlin’s picture

Status: Active » Needs review
StatusFileSize
new1.54 KB

patch flying in.

mimemail.rules.inc should also convert empty strings to arrays.
also removed a double "trim".

guillaumev’s picture

sgabe’s picture

Title: error when rules sends mail with no attachments » Check if attachments is an array and isn't empty
Status: Needs review » Fixed
StatusFileSize
new1.04 KB
new980 bytes

Thanks, committed on both branches.

Status: Fixed » Closed (fixed)

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

hanskuiters’s picture

Thanks for the D6 fix. Just needed it.