ID: 35393 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.1.0 Assigned To: dmitry New Comment:
Fixed in CVS HEAD and PHP_5_1. Previous Comments: ------------------------------------------------------------------------ [2005-11-25 14:49:04] [EMAIL PROTECTED] Assigned to Dmitry by his request. ------------------------------------------------------------------------ [2005-11-25 14:46:39] [EMAIL PROTECTED] Description: ------------ It's possible to change value of static protected member with a tricky code like the one below (pay attention to the "()" around the method call). Reproduce code: --------------- class ObjectPath { static protected $type = array(0=>'main'); static function getType() { return self::$type; } } var_dump(ObjectPath::getType()); $object_type = array_pop((ObjectPath::getType())); var_dump(ObjectPath::getType()); Expected result: ---------------- array(1) { [0]=> string(4) "main" } array(1) { [0]=> string(4) "main" } Actual result: -------------- array(1) { [0]=> string(4) "main" } array(0) { } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35393&edit=1