Anonymous | Login | Signup for a new account | 11-07-2024 17:07 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ 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 | |||||||||
Status | assigned | Product 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'" ?> |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
45 total queries executed. 34 unique queries executed. |