Hi I have added 2 date fields to a webform, then added a validation rule to compare two values, making sure the start date is > then the end date. If I go on the form, don't enter any values, and click next/submit, I get the following errors:
Notice: Undefined index: month in webform_validation_webform_validation_validate() (line 599 of .../webform_validation/webform_validation.validators.inc).
Notice: Undefined index: day in webform_validation_webform_validation_validate() (line 599 of .../webform_validation/webform_validation.validators.inc).
Notice: Undefined index: year in webform_validation_webform_validation_validate() (line 599 of .../webform_validation/webform_validation.validators.inc).
That line of code is using the php checkdate function, if I add a empty check in that statement the error goes away. Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#2 | webform_validation-compare-dates-2676630-2.patch | 823 bytes | natew |
Comments
Comment #2
natew CreditAttribution: natew commentedHere is the patch...
Comment #4
Liam MorlandThanks very much!