#23378 [NEW]: wrong HTML for selectboxes

From: Date: Mon, 28 Apr 2003 08:30:43 +0000
Subject: #23378 [NEW]: wrong HTML for selectboxes
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15639@lists.php.net to get a copy of this message
From: tomas at dupoint dot com Operating system: win 2000 PHP version: 4.3.0 PHP Bug Type: PEAR related Bug description: wrong HTML for selectboxes When I used the setDefaults() method in QuickForm to set the selected option in a selectbox I get this HTML code: <option [...] 0="selected"> and the options doesn't get selected. The following code in toHTML (in select.php) seems wrong: foreach ($this->_options as $option) { if (is_array($this->_values) && in_array($option['attr']['value'], $this->_values)) { $this->_updateAttrArray($option['attr'], array('selected')); } should be: foreach ($this->_options as $option) { if (is_array($this->_values) && in_array($option['attr']['value'], $this->_values)) { $this->_updateAttrArray($option['attr'], array('selected' => 'selected')); } -- Edit bug report at http://bugs.php.net/?id=23378&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23378&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23378&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23378&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23378&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23378&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23378&r=support Expected behavior: http://bugs.php.net/fix.php?id=23378&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23378&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23378&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23378&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23378&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23378&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23378&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23378&r=gnused

« previous php.pear.dev (#15639) next »