Home » HTML » HTML_QuickForm » Bug #4401
Problem with select menu order of date fields.
Details
| Submitted | 2005-05-21 21:29 UTC |
|---|---|
| From | mosh at tobt dot de |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | 4.3.1 |
| OS | SuSe Linux dd6422 2.4.21-2 |
| Roadmaps | (Not assigned) |
Comments
[2005-05-21 21:29 UTC] mosh at tobt dot de
Description:
------------
The problem with the select menu order of date fields is caused in file HTML/Quickform/date.php at line 353. The bug only occurs on the webserver of my ISP running SuSE Linux and PHP 4.31. On my localhost running WinXP/PHP 5.04 everything works as supposed.
Reproduce code:
---------------
I needed to change
$options = array($this->_options['emptyOptionValue'] => $this->_options['emptyOptionText']) + $options;
to
$options = array_merge(array($this->_options['emptyOptionValue'] => $this->_options['emptyOptionText']), $options);
because otherwise the "emptyOption" has been placed at the end of the list and not as first option as supposed!
Expected result:
----------------
The "emptyOption" should be the first option in the list.
Actual result:
--------------
But it is placed at the end of the select menu.