HTML_QuickForm_select sugestion
| From: | Yavor Shahpasov | Date: | Fri, 19 Dec 2003 14:05:35 +0000 |
| Subject: | HTML_QuickForm_select sugestion | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-24536@lists.php.net to get a copy of this message | ||
In HTML_QuickForm_select on line 74 (latest release not cvs)
function HTML_QuickForm_select($elementName=null, $elementLabel=null, $options=null, $attributes=null)
{
HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'select';
if (isset($options)) {
$this->load($options);
}
} //end constructor
checks if the $options variable is set
if you call it like this
$select = new HTML_QuickForm_select('sel', '', '', array('class'=>'blue'));
it will attempt to load from database and fail, sugested solution, change isset($options) to !empty($options)
--
Yavor Shahpasov
yavo@siava.org