PHP 4.0 Bug #9093 Updated: if(1) fails

From: Date: Mon, 05 Feb 2001 15:54:43 +0000
Subject: PHP 4.0 Bug #9093 Updated: if(1) fails
Groups: php.dev 
Request: Send a blank email to php-dev+get-45785@lists.php.net to get a copy of this message
ID: 9093 Updated by: waldschrott Reported By: richchri@con2.com Old-Status: Closed Status: Bogus Bug Type: Scripting Engine problem Assigned To: Comments: bogusing Previous Comments: --------------------------------------------------------------------------- [2001-02-03 19:04:24] richchri@con2.com The code causing the error looks something like this.... Here is the value of $name: "some_data" if($what_the_fuck= ($name != NULL)) { echo "debug (passed): $what_the_fuck"; } else { echo "debug (failed): $what_the_fuck"; } And this is what is happening..... debug (failed): 1 ERROR: Template: trying to set NULL template variable name the "what_the_fuck" variable == 1 so why is if failing. "name" == "some_data". If ($name != NULL) == 1 then if should not fail. P.S. I added the "what_the_fuck" for clearity only. thanks, richie --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9093&edit=2

« previous php.dev (#45785) next »