Re: Bug in HTML/QuickForm/element.php ?

From: Date: Thu, 06 Sep 2007 14:10:00 +0000
Subject: Re: Bug in HTML/QuickForm/element.php ?
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27884@lists.php.net to get a copy of this message
Hi, Alessandro Pasotti wrote:
I'm not sure if this is a bug or not, in the function listed below, 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 Do you think I should file the bug?
Yes this does look like a bug and the file in CVS still has this type of check... please raise a bug report.
Filed: http://pear.php.net/bugs/bug.php?id=11995
Thanks for report, looks like this was copied into HTML_QuickForm2, too...

« previous php.pear.general (#27884) next »