Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003857 [Quercus] minor always 01-22-10 17:27 02-04-10 12:03
Reporter nam View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 4.0.2
Summary 0003857: vbulletin - incorrect evaluation order of $this->{$table}["$fieldname"]
Description (rep by mrtom)

http://forum.caucho.com/showthread.php?t=3316 [^]

<?php

class A
{
  var $foo = array();

  function test()
  {
    $bar = "123";
  
    $fieldname = "myName";
    $table = "foo";
  
    $this->{$table}["$fieldname"] = &$bar;
    
    var_dump($this->foo);
  }
  
  function test2()
  {
    $bar = "123";
  
    $fieldname = "myName";
    $table = "foo";
  
    $arr = $this->{$table};
    $arr["$fieldname"] = &$bar;
    
    var_dump($this->foo);
  }
}

$a0 = new A();
$a1 = new A();

$a0->test();
$a1->test2();

?>
Additional Information
Attached Files

- Relationships

- Notes
(0004394)
ferg
01-28-10 09:21

This is a great bug report. Thanks for the details!
 
(0004413)
emil
02-04-10 12:03

php/098c
 

- Issue History
Date Modified Username Field Change
01-22-10 17:27 nam New Issue
01-22-10 18:12 nam Description Updated
01-28-10 09:21 ferg Note Added: 0004394
02-04-10 12:03 emil Status new => closed
02-04-10 12:03 emil Note Added: 0004413
02-04-10 12:03 emil Resolution open => fixed
02-04-10 12:03 emil Fixed in Version  => 4.0.4


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker