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

Bug #8305 PHP-Warning with empty hiddenselect
Submitted: 2006-07-27 07:37 UTC
From: arne dot bippes at brandao dot de Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.6)
PHP Version: Irrelevant OS: irrelevant
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 : 34 - 10 = ?

 
 [2006-07-27 07:37 UTC] arne dot bippes at brandao dot de (Arne Bippes)
Description: ------------ HTML_QuickForm_hiddenselect throws a PHP-Warning in function toHtml()if $this->_values is empty. (e.g. not calling loadDbResult() with values ) A quick patch would be to check in hiddenselect.php if $this->_values is an array otherwise return empty string: 77: ... 78: $strHtml = ''; 79: 80: /** Patch start */ 81: if (! is_array($this->_values)) { 82: return $strHtml; 83: } 84: /** Patch end */ 85: 86: foreach ($this->_values as $key => $val) { ... Expected result: ---------------- No Warning Actual result: -------------- Warning: Invalid argument supplied for foreach() in /pear/HTML/QuickForm/hiddenselect.php on line 80

Comments

 [2006-10-06 16:01 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 21:19 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!