PEAR is archived and read-only

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

Home » Database » DB_Table » Bug #2799

Error in getFormElement

Details

Submitted2004-11-19 21:23 UTC
Fromdavid at glennweb dot net
Assignedpmjones
StatusClosed
PackageDB_Table
PHP Version4.3.3
OSWinXP
Roadmaps(Not assigned)

Comments

[2004-11-19 21:23 UTC] david at glennweb dot net

Description:
------------
Through Yawp_Table I have run into an issue with DB_Table. I am creating a custom form and found that getFormElement has what looks like a bug. The call to _getFormColDefs returns an array, which is being passed directly to the getElement call. However, getElement is not expecting an array so can't find any of the qf_ keys. I believe this is more inline with what needs to be done, calling getElement with the particular value of the $coldef array we are looking for ($coldef[$column]):

function &getFormElement($column, $elemname)
{
include_once 'DB/Table/QuickForm.php';
$coldef = $this->_getFormColDefs($column);
return DB_Table_QuickForm::getElement($coldef[$column], $elemname);
}