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

Bug #11995 getFrozenHtml() renders a 0 as a space
Submitted: 2007-09-06 13:32 UTC
From: elpaso Assigned: avb
Status: Closed Package: HTML_QuickForm (version 3.2.9)
PHP Version: 5.2.1 OS: linux
Roadmaps: 3.2.10    
Subscription  


 [2007-09-06 13:32 UTC] elpaso (Alessandro Pasotti)
Description: ------------ In file HTML/QuickForm/element.php If $value is set to zero, it is rendered as an ' '. I would expect it prints '0' instead. function getFrozenHtml() { $value = $this->getValue(); return ('' != $value? htmlspecialchars($value): ' ') . $this->_getPersistantData(); } //end func getFrozenHtml Perhaps it should check for '' !== $value

Comments

 [2007-09-06 14:17 UTC] avb (Alexey Borzov)
Should probably use a strlen() check here. This should also be fixed in HTML_QuickForm2, it has the same code in Element_Input::getFrozenHtml()...
 [2007-10-05 10:23 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.