RE: [PEAR-DEV] Possible Bug in Quickform / Select
| From: | Pascal THUET | Date: | Fri, 08 Aug 2003 16:21:26 +0000 |
| Subject: | RE: [PEAR-DEV] Possible Bug in Quickform / Select | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19407@lists.php.net to get a copy of this message | ||
>I don't think that's the problem.
>Could you be more precise about when this happens ?
>Even better, could you send a piece of code that can reproduce this bug.
the function in_array(0, array('All')) will return true
that means that if you have such a combobox
<select name="select" size="1">
<option value="All" >All</option>
<option value=0 >Choice1</option>
<option value=1>Choice2</option>
</select>
build with
$select = &HTML_QuickForm::createElement('select', 'iselTest', 'Test
Select:', array(All'=>'All',
"0"=> choice1,
"1"=> choice2));
and if you apply
$select->setSelected("All")
you will have 2 elements selected : "All" and "choice1".