Mantis - Quercus
Viewing Issue Advanced Details
1624 major always 02-24-07 04:31 03-20-07 14:58
romaz  
nam  
normal  
closed 3.1.0  
fixed  
none    
none 3.1.1  
0001624: StackOverflowError when assigning a value to an instance variable from __set()
If you try to access an object property from inside the "field interceptor" __set() method, you go in a infinite loop.
Code to reproduce bug:

class Overloaded {
        function __set( $var, $value ) {
                $this->$var = $value;
        }
}

$o = new Overloaded();
$o->foo = 0;

Significative portion of the stacktrace (looping):
at com.caucho.quercus.program.Function.call(Function.java:264)
    at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:208)
    at com.caucho.quercus.program.AbstractFunction.callMethod(AbstractFunction.java:394)
    at com.caucho.quercus.env.ObjectExtValue.putField(ObjectExtValue.java:307)
    at com.caucho.quercus.expr.ThisFieldExpr.evalAssign(ThisFieldExpr.java:130)
    at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:79)
    at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:63)
    at com.caucho.quercus.program.Function.callImpl(Function.java:316)

Notes
(0001780)
nam   
03-20-07 14:58   
php/09k6
php/39k6