Patch attached here

This error can be recreated by the following steps:
1. Create Fresh Webform without any components
2. Attempt to add email address.

Errors
* warning: array_filter() [function.array-filter]: The first argument should be an array in /home/troynt/public_html/voteapi/drupal/sites/all/modules/webform/includes/webform.emails.inc on line 404.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /home/troynt/public_html/voteapi/drupal/sites/all/modules/webform/includes/webform.emails.inc on line 404.
* warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/troynt/public_html/voteapi/drupal/sites/all/modules/webform/includes/webform.emails.inc on line 405.
* warning: implode() [function.implode]: Invalid arguments passed in /home/troynt/public_html/voteapi/drupal/sites/all/modules/webform/includes/webform.emails.inc on line 465.

Comments

quicksketch’s picture

Status: Active » Needs work

Thanks, I've seen this error when working on the 7.x version. In the future, take a look at http://drupal.org/coding-standards, since this patch has a couple problems even though it's only a few lines. Thanks!

  // Space between if and (.
  // No spaces around condition inside the ()
  // Always use open and close brackets {}
  if (!is_array($form_state['values']['components'])) {
    $form_state['values']['components'] = array();
  }
quicksketch’s picture

Status: Needs work » Fixed
StatusFileSize
new1.25 KB

This patch should correct the problems. Committed to D6/7 branches.

Status: Fixed » Closed (fixed)

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