Drupal 6.26
Webform 6.x-3.18
Webform validator 6.x-1.5

We have set the validation rules for: Words blacklist, Regular expression, Minimum number of words, Maximum length, Exact number of selections required and Regular expression.

Whenever an anonymous user fills out then submits a webform on our website they get the following error message.

warning: array_filter() [function.array-filter]: The first argument should be an array in /home/public_html/sites/all/modules/webform_validation/webform_validation.validators.inc on line 435.
warning: array_filter() [function.array-filter]: The first argument should be an array in /home/public_html/sites/all/modules/webform_validation/webform_validation.validators.inc on line 435.
warning: array_filter() [function.array-filter]: The first argument should be an array in /home/public_html/sites/all/modules/webform_validation/webform_validation.validators.inc on line 435.

We have searched on this forum but we did not find a similar issue.

Below is the code inside the webform_validation.validators.inc on line 435

   }
        }
        return $errors;
        break;
      case "select_exact":
        $allowed_selections = $rule['data'];
        foreach ($items as $key => $val) {
          $selected_values = isset($check_false_callback) ? array_filter($val, $check_false_callback): array_filter($val);
          if (is_array($val) && (count($selected_values) != $allowed_selections)) {
            $errors[$key] = t('Please select %num options for %item', array('%num' => $allowed_selections, '%item' => $components[$key]['name']));
          }
        }

I hope someone can help me to solve the problem.
Thank you.

Comments

liam morland’s picture

Status: Active » Closed (won't fix)

Drupal 6 is no longer supported. If this issue exists in a later version of webform_validation, please re-open and update the version number.

liam morland’s picture

Status: Closed (won't fix) » Closed (outdated)