Re: [SMARTY] bug equating zero and null

From: Date: Tue, 21 Dec 2004 11:11:32 +0000
Subject: Re: [SMARTY] bug equating zero and null
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12058@lists.php.net to get a copy of this message
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? > > ?? >

« previous php.smarty.general (#12058) next »