Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001666 [Quercus] minor always 04-02-07 16:25 04-05-07 10:45
Reporter ddossot View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 3.1.1
Summary 0001666: Parsing error (in CakePHP controller.php script)
Description I had to modify this PHP code:

  $model =& new $this->modelClass($id);

to this form:

  $modelClass = $this->modelClass;
  $model =& new $modelClass($id);

as the first form is interpreted wrongly as being a call to $this->modelClass with the $id parameter instead of an instantiation of a new class named $this->modelClass, passing &id to its constructor.
Additional Information
Attached Files

- Relationships

- Notes
(0001811)
nam
04-04-07 23:35

simplified test case

class FirstClass
{
  var $a = "FirstClass";

  function foo()
  {
    $b = "FirstClass";

    var_dump(new $this->a());
    var_dump(new $b());
  }
}

$first = new FirstClass();
$first->foo();
 
(0001816)
nam
04-05-07 10:45

php/09fj
 

- Issue History
Date Modified Username Field Change
04-02-07 16:25 ddossot New Issue
04-04-07 23:35 nam Note Added: 0001811
04-05-07 10:45 nam Status new => assigned
04-05-07 10:45 nam Assigned To  => nam
04-05-07 10:45 nam Status assigned => closed
04-05-07 10:45 nam Note Added: 0001816
04-05-07 10:45 nam Resolution open => fixed
04-05-07 10:45 nam Fixed in Version  => 3.1.1


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