QuickForm and 0 values
| From: | Emiliano Saurin | Date: | Fri, 26 Jul 2002 10:04:04 +0000 |
| Subject: | QuickForm and 0 values | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-1977@lists.php.net to get a copy of this message | ||
Hello,
In the method HTML_QuickForm_element::getFrozenHtml() there is a check if the value is empty.
But the PHP empty function return true also if the value is 0.
So if I have a frozed (integer) field with a 0 value It's not seen cause for the method it's empty.
In my element.php I've fixed it putting
if ($value != '')
instead of:
if (!empty($value))
I dunno if it's logical correct or not.. the problem is that I have to print 0 values :)
bye
Emiliano Saurin