There's a line of code in webform_format_email_address that causes submissions to display a warning message when a form is submitted and the form is set up to email a component value.

Line 4317 of webform.module

        foreach ($name as &$one_name) {
          $name = isset($options[$one_name]) ? $options[$one_name] : $name;
        }

Since name begins the foreach as an array, but is converted to a string, the foreach barks the warning. This might be related to specific version of PHP, I'm using 5.5.27.

Comments

delzhand’s picture

StatusFileSize
new2.16 KB

Solution attached.

delzhand’s picture

Issue summary: View changes
danchadwick’s picture

Version: 7.x-4.10 » 7.x-4.x-dev
Status: Active » Fixed
StatusFileSize
new1 KB

Thanks for the report. The problem is that the code isn't doing what it should, rather than is using PHP in a version-specific way. I'm not sure if the bug could ever cause a functional issue, but now it's fixed regardless.

Fixed in 7.x-4.x and 8.x.

  • DanChadwick committed 50cb104 on 8.x-4.x
    Issue #2535378 by DanChadwick: Fixed invalid argument in foreach in...

  • DanChadwick committed cfce42f on
    Issue #2535378 by DanChadwick: Fixed invalid argument in foreach in...

Status: Fixed » Closed (fixed)

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