This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Calling SetValue on Element/DateSelect with an empty string set's to todays date #8
Open
Description
If a DateSelect element has it's value set to an empty string, due to the behaviour of php's date time object; the element is set to today's date. See offending code:
zend-form/src/Element/DateSelect.php
Line 106 in 29a930f
This may be considered desirable; however if the option create_empty_option is set to create a default empty option, this behaviour prevents the element from being set back to the empty option.
The fix would be to test for an empty string in that conditional, but is a potential BC break