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

Bug #14540 Rules for each group element not removed when removing a group
Submitted: 2008-08-22 08:59 UTC
From: onokazu Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.10)
PHP Version: 4.4.9 OS: Mac OSX
Roadmaps: 3.2.11    
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 : 48 - 24 = ?

 
 [2008-08-22 08:59 UTC] onokazu (Kazumi Ono)
Description: ------------ When removing a group, if the group contains rules for grouped elements, those rules are not removed which causes a fatal error. PHP Fatal error: Call to undefined function: isfrozen() in HTML/QuickForm.php on line 1768

Comments

 [2008-08-22 09:17 UTC] onokazu (Kazumi Ono)
Here is a possible patch @@ -1031,6 +1031,12 @@ } if ($removeRules) { unset($this->_rules[$elementName], $this- >_errors[$elementName]); + if ($el->getType() == 'group') { + $el_elements = $el->getElements(); + foreach (array_keys($el_elements) as $i) { + unset($this->_rules[$el_elements[$i]->getName()]); + } + } } return $el; } // end func removeElement
 [2008-10-10 17:26 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.