PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #4954

Fatal error on PHP 5.1.0-b3

Details

Submitted2005-07-31 13:03 UTC
Fromsuzukim at webquest dot co dot jp
StatusDuplicate
PackageHTML_QuickForm
PHP Version5.1.0
OSIrrelevant
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 :-(