|
Mantis - Quercus
|
|||||
| Viewing Issue Advanced Details | |||||
|
|
|||||
| ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
| 4324 | major | always | 12-09-10 12:23 | 03-22-12 13:42 | |
|
|
|||||
| Reporter: | gbruins | Platform: | |||
| Assigned To: | OS: | ||||
| Priority: | normal | OS Version: | |||
| Status: | assigned | Product Version: | |||
| Product Build: | Resolution: | open | |||
| Projection: | none | ||||
| ETA: | none | Fixed in Version: | |||
|
|
|||||
| Summary: | 0004324: unset() function does not work properly | ||||
| Description: |
Per the manual on php.net: "__unset() is invoked when unset() is used on inaccessible properties" However __unset() not called on inaccessible object properties. Here is some code that reproduces the issue: =================================================== <?php class PropertyTest { /** Location for overloaded data. */ private $data = array(); /** Overloading not used on declared properties. */ public $declared = 1; /** Overloading only used on this when accessed outside the class. */ private $hidden = 2; /** As of PHP 5.1.0 */ public function __unset($name) { echo "Unsetting '$name'\n"; unset($this->data[$name]); } } $obj = new PropertyTest; echo "Unsetting visible object property\n\n"; unset($obj->declared); // should not print anything echo "\n\nUnsetting invisible object property\n"; unset($obj->hidden); // should print "Unsetting 'hidden'" ?> |
||||
| Steps To Reproduce: | |||||
| Additional Information: | |||||
| Relationships | |||||
| Attached Files: | |||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||