Mantis - Quercus
Viewing Issue Advanced Details
4554 major always 05-16-11 03:28 03-22-12 13:41
pgervaise  
 
normal  
acknowledged 4.0.14  
open  
none    
none  
0004554: Class variable "not found" if null
When setting a class property to NULL then the class property is as non existing so the function __get() is called !

[code]
<?php
    class A {
        public $attr = null;

        public function __get($name) {
            die("UNKNOW ATTRIBUTE : $name");
        }
    }

    $a = new A();
    echo is_null($a->attr) ? "NULL" : "NOT NULL";
?>
[/code]

This code fail (die) with Quercus 4.0.18 but work with Quercus 4.0.11 (and work with PHP).
 bug_class_attr_null.php [^] (184 bytes) 05-16-11 03:28

There are no notes attached to this issue.