Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #8497 3.2.6 hierselect can't handle numeric options (chokes on indexOf)
Submitted: 2006-08-18 05:01 UTC
From: gmalazdrewicz at gmail dot com Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.6)
PHP Version: 4.3.9 OS: Linux 2.4.21 (RHEL3)
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 12 + 49 = ?

 
 [2006-08-18 05:01 UTC] gmalazdrewicz at gmail dot com (Gerardo Malazdrewicz)
Description: ------------ Use of hierselect with numeric options causes it to cease functioning when you choose another option. Firefox JavaScript console reports "indexOf is not a function" Fix: Convert the numeric options to strings before processing. Test script: --------------- Patch: ------------------------------------------------------------- for (i in optionList) { + var option = String(optionList[i]); - var optionText = (-1 == optionList[i].indexOf('&'))? optionList[i]: _hs_unescapeEntities(optionList[i]); + var optionText = (-1 == option.indexOf('&'))? option: _hs_unescapeEntities(option); ctl.options[j++] = new Option(optionText, i, false, false); } -------------------------------------------------------------

Comments

 [2006-10-06 15:41 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2006-10-07 15:08 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!