AW: [PEAR-DEV] XML::Util skips 0 (zero) cData values
| From: | Stephan Schmidt | Date: | Fri, 05 Sep 2003 09:02:51 +0000 |
| Subject: | AW: [PEAR-DEV] XML::Util skips 0 (zero) cData values | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21098@lists.php.net to get a copy of this message | ||
Hi,
> When a content value of (int) 0 is set,
> createTagFromArray creates an empty tag:
> <tag attr="test"/>
> instead of:
> <tag attr="test">0</tag>
>
> I would think this is undisireable behaviour,
> caused by this:
>
> line 313:
> if (!isset($tag["content"]) || empty($tag["content"])) {
>
> In my opinion it should be:
> if (!isset($tag["content"]) || $tag["content"] == '') {
>
> Any input on this?
Of course you are right.
Thanks for the bug report, I'll fix it this evening and make a bugfix
release.
In the future it would be great to file a report on bugs.php.net, so your
report will get more attention if the maintainer of a project does not read
pear-dev regularly...
Stephan