I got these messages:

    * warning: array_merge() [function.array-merge]: Argument #2 is not an array in /sites/all/modules/webform/webform.module on line 1450.
    * warning: Invalid argument supplied for foreach() in /includes/mail.inc on line 180.

Not sure why actually. Solved this by patching webform_mail():

  if (is_array ($params['headers']))
    $message['headers'] = array_merge($message['headers'], $params['headers']);

In case someone else stumbles upon this.

Comments

esbon’s picture

Have the same problem, but it did not get rid of the error messages. Thanks for the tip

quicksketch’s picture

Status: Needs review » Postponed (maintainer needs more info)

Hi guys, could you tell me what (if any) modules you're using related to e-mails? Are you doing any custom theming of your e-mails? Can this be reproduced on a clean install? Currently I'm not seeing this issue and these are the only reports of it.

esbon’s picture

I am using mimemail with only the default mail.css altering the width of the email

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Still haven't been able to reproduce this issue. Please reopen if you can provide steps to reproduce from a clean Drupal install, including all version numbers of installed modules.

ben.denham’s picture

Version: 6.x-3.11 » 6.x-3.18
Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new556 bytes

We are experiencing the same issue, and we are not using any additional modules relating to emails.
We are using Webform 6.x-3.18

I have attached a patch for the fix in the original issue.

quicksketch’s picture

Status: Needs review » Postponed (maintainer needs more info)

@ben.denham: Please provide instructions on reproducing this problem from a clean install of Webform. As far as I can tell, there isn't a problem here. The only way I could see this problem happening would be if theme_webform_email_headers() was overridden in your theme and you returned an empty string (instead of an empty array).

DeNelo’s picture

I get this error in 7.x-4.0-beta1.
I have added the following to template.php:

function fusion_core_webform_mail_headers_312($variables) {
  $headers = array(
    'Content-Type'  => 'text/html; charset=UTF-8; format=flowed; delsp=yes',
    'X-Mailer' => 'Drupal Webform (PHP/' . phpversion() . ')',
  );
  return $headers;
}

The error is:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array i webform_mail() (linje 1954 af /home/mysite/public_html/sites/all/modules/webform/webform.module).
Warning: Invalid argument supplied for foreach() i DefaultMailSystem->mail() (linje 54 af /home/mysite/public_html/modules/system/system.mail.inc).
Warning: array_merge() [function.array-merge]: Argument #2 is not an array i webform_mail() (linje 1954 af /home/mysite/public_html/sites/all/modules/webform/webform.module).
Warning: Invalid argument supplied for foreach() i DefaultMailSystem->mail() (linje 54 af /home/mysite/public_html/modules/system/system.mail.inc).

Applying the "fix" in #0 removes the error.
I haven't any mail-related modules installed.

DeNelo’s picture

Followup on #7:
Outlook reports the following headers:
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal

Text/plain?

danchadwick’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closed for lack of activity