This is a followup to #2953662: Only use count() on countables.
Warning: count(): Parameter must be an array or an object that implements Countable in _webform_edit_email() (line 64 of webform/components/email.inc).
This occurs when editing an email component where the value is "[current-user:mail]". The assumption that form_get_errors() will return an array (countable) is a reasonable one because of the documentation, but incorrect. See #2733299: Documentation and behavior mismatch in form_get_errors.
This patch fixes the ternary condition.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | webform-v3-email-component-countables.patch | 593 bytes | caschbre |
| webform-email-component-countables.patch | 607 bytes | jacob.embree |
Comments
Comment #3
liam morlandThanks!
Comment #5
caschbre commentedJust in case someone needs a patch that applies to 7.x-3.x...