Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002837 [Quercus] minor always 08-12-08 07:53 08-14-08 10:38
Reporter wikipo View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 3.2.0
Summary 0002837: argument by reference and self::
Description When calling a class method with the self::method syntax, the arguments passed by reference are not updated on return.

For example, in
<?php

 class test
{
 function f1(&$str)
 {
     $str = "text";
 }
 function f2()
 {
    $str = "";
    self::f1($str);
    echo "result: ";
    echo $str;
 }
}
$b = new test();
$b->f2();
?>

displays: "result: " (insted of "result: text")



Additional Information I modified the code in ClassMethodExpr/eval(),

subsituting: values[i] = _args[i].eval(env);
with: values[i] = _args[i].evalArg(env);

and it seems to correct this issue.
Attached Files

- Relationships

- Notes
(0003332)
nam
08-14-08 10:38

php/09e1
php/39e1
 

- Issue History
Date Modified Username Field Change
08-12-08 07:53 wikipo New Issue
08-14-08 10:38 nam Status new => assigned
08-14-08 10:38 nam Assigned To  => nam
08-14-08 10:38 nam Status assigned => closed
08-14-08 10:38 nam Note Added: 0003332
08-14-08 10:38 nam Resolution open => fixed
08-14-08 10:38 nam Fixed in Version  => 3.2.1


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