| Anonymous | Login | Signup for a new account | 10-25-2025 20:58 PDT |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0004324 | [Quercus] | major | always | 12-09-10 12:23 | 03-22-12 13:42 | |||||||
| Reporter | gbruins | View Status | public | |||||||||
| Assigned To | ||||||||||||
| Priority | normal | Resolution | open | Platform | ||||||||
| Status | assigned | OS | ||||||||||
| Projection | none | OS Version | ||||||||||
| ETA | none | Fixed in Version | Product Version | |||||||||
| Product Build | ||||||||||||
| 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 | ||||||||||||
| Attached Files | ||||||||||||
|
|
||||||||||||
| Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
45 total queries executed. 34 unique queries executed. |