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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

natew created an issue. See original summary.

natew’s picture

Here is the patch...

  • Liam Morland committed 2cc261d on 7.x-1.x authored by natew
    Issue #2676630 by natew: Date comparaison with no values causes...
Liam Morland’s picture

Status: Active » Fixed

Thanks very much!

Status: Fixed » Closed (fixed)

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