Home » HTML » HTML_QuickForm » Bug #4954
Fatal error on PHP 5.1.0-b3
Details
| Submitted | 2005-07-31 13:03 UTC |
|---|---|
| From | suzukim at webquest dot co dot jp |
| Status | Duplicate |
| Package | HTML_QuickForm |
| PHP Version | 5.1.0 |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-07-31 13:03 UTC] suzukim at webquest dot co dot jp
Description:
------------
Fatal error occurs on PHP 5.1.0-b3.
Fatal error: Only variables can be passed by reference in C:\php5\PEAR\HTML\QuickForm.php on line 594
Error seems to occur when 'addElement' is first called.
Test script:
---------------
Line 594:
$this->_elementIndex[$elementName] = end(array_keys($this->_elements));
I changed the line to the following, and it worked.
$array_keys = array_keys($this->_elements);
$this->_elementIndex[$elementName] = $array_keys[count($array_keys)-1];
// must be more elegant :-(