php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9093 if(1) fails
Submitted: 2001-02-03 19:04 UTC Modified: 2001-02-05 10:54 UTC
From: richchri at con2 dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: richchri at con2 dot com
New email:
PHP Version: OS:

 

 [2001-02-03 19:04 UTC] richchri at con2 dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-05 10:54 UTC] waldschrott@php.net
bogusing
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC