Re: [SMARTY] bug equating zero and null
| From: | Heitzso | Date: | Tue, 21 Dec 2004 11:34:31 +0000 |
| Subject: | Re: [SMARTY] bug equating zero and null | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12059@lists.php.net to get a copy of this message | ||
But php gives me "===" and as of 2.6.3 smarty doc
(running gentoo linux) smarty doesn't have that
equivalent test. ?
Neither. It's the same behaviour you would expect from the PHP language: tom@vanilla:~$ cat test.php <?php if (0 == null) {echo "0 == null\n";} if (0 === null) {echo "0 === null\n";} ?> tom@vanilla:~$ php -f test.php 0 == null On Tue, 2004-12-21 at 20:46, Heitzso wrote:Hi, I'm fighting what appears to be a bug in smarty. My variable (let's say $x) coming in is NULL. I have a smarty test: {if $x eq '0'}selected{/if} that is getting triggered by $x being NULL. Ouch. Is that a bug or a feature? ??