PEAR is archived and read-only

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

Home » Database » DB_DataObject_FormBuilder » Bug #4668

Fatal error: Call to undefined method HTML_QuickForm_Error::updateAttributes()

Details

Submitted2005-06-23 15:16 UTC
Frompnovess at mac dot com
Assignedjustinpatrin
StatusBogus
PackageDB_DataObject_FormBuilder
PHP Version5.0.4
OSFedora Core 3
Roadmaps(Not assigned)

Comments

[2005-06-23 15:16 UTC] pnovess at mac dot com

Description:
------------
The error below is presented when using elementTypeMap to set the form elements. I am using HTML_QuickForm-3.2.4pl1 and get the error below.

Fatal error: Call to undefined method HTML_QuickForm_Error::updateAttributes() in /usr/share/pear/DB/DataObject/FormBuilder/QuickForm.php on line 630

Reproduce code:
---------------
Line 630 of the Quickform.php file needs to be updated to use the correct QuickForm function. Change from this $element->updateAttributes($attr); to
$element->updateElementAttr($attr); Per the HTML_Quickform manual.

[2005-06-23 15:20 UTC] pnovess at mac dot com

This is not the problem. Don't know what the problem is.

Here is the relevant code that has problems -
function &_createDateElement($fieldName) {
$dateOptions = array('format' => $this->dateElementFormat,
'language' => $this->dateFieldLanguage);
if (method_exists($this->_fb->_do, 'dateoptions')) {
$dateOptions = array_merge($dateOptions, $this->_fb->_do->dateOptions($fieldName));
}
if (!isset($dateOptions['addEmptyOption']) && in_array($fieldName, $this->_fb->selectAddEmpty)) {
$dateOptions['addEmptyOption'] = true;
$dateOptions['emptyOptionText'] = $this->_fb->selectAddEmptyLabel;
}
$element =& HTML_QuickForm::createElement($this->_getQFType('date'),
$this->_fb->getFieldName($fieldName),
$this->_fb->getFieldLabel($fieldName),
$dateOptions);
$attr = $this->_getAttributes('date', $fieldName);
$element->updateAttributes($attr);
return $element;
}