|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28183 Variables mix up
Submitted: 2004-04-27 16:21 UTC Modified: 2004-05-05 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: patrick dot hagemeister at krankikom dot de Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.3.6 OS: Linux SuSE 8.0
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.
Block user comment
Status: Assign to:
Bug Type:
From: patrick dot hagemeister at krankikom dot de
New email:
PHP Version: OS:


 [2004-04-27 16:21 UTC] patrick dot hagemeister at krankikom dot de
I have a medium-sized php applications (~20000 lines), which starts to produce a few problems.

Sometimes, variables mix up:
i.e. i create a new instance $root of class "CBXTreeNode", but only 3 lines later, suddenly the class type (checked using get_class()) of $root is "CBXWorkflow", and the value is the one of another variable in the same function.

But between these lines, i didn't even touch the variable...

In some places, a similar problem shows up:
I instanciate a class CBXTreeNode, but if i do get_class($variable), it returns "cbxtreenodd" instead of ctxtreenode.

Unfortunately i could not reproduce it on every server, on my development server it works, on the production server, it doesn't :( 

Also, the exact same source works outside my application, on the same server.

I updated PHP from 4.2.3 to 4.3.6, but no change.

Reproduce code:
$root = $treemgr->getRootNode();		
echo "root is class ".get_class($root)."<br>";

$workflow =& $this->getWorkflow();
echo "workflow is class ".get_class($workflow)."<br>";

echo "root is class ".get_class($root)."<br>";

// **Output in my application**
// root is class CBXTreeNode
// workflow is class SPWorkflow
// root is class SPWorkflow

Expected result:
Output should be:

root is class CBXTreeNode
workflow is class SPWorkflow
root is class CBXTreeNode


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-27 16:26 UTC] patrick dot hagemeister at krankikom dot de
Changed category to "Scripting engine problem"
 [2004-04-27 21:13 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.
 [2004-05-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 17:01:31 2024 UTC