#39000 [Opn->Fbk]: Attempting to set a subclass' private property in __set crashes PHP (& Apache)
| From: | bjori@php.net | Date: | Sat, 30 Sep 2006 12:40:16 +0000 |
| Subject: | #39000 [Opn->Fbk]: Attempting to set a subclass' private property in __set crashes PHP (& Apache) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-102918@lists.php.net to get a copy of this message | ||
ID: 39000
Updated by: bjori@php.net
Reported By: kzantow at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Windows XP SP2
PHP Version: 5.1.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Can't reproduce
Previous Comments:
------------------------------------------------------------------------
[2006-09-30 05:07:27] kzantow at gmail dot com
Description:
------------
Attempting to set a subclass' private property in __set causes PHP
5.1.6 (and Apache 2.2.3 using XAMPP 1.5.4) to crash.
Reproduce code:
---------------
class CrashParent {
public function __set($propertyName, $value) {
$this->$propertyName = $value;
}
}
class CrashChild extends CrashParent {
private $a_property;
}
$instance = new CrashChild();
// Crash here:
$instance->a_property = "a new value";
Expected result:
----------------
Not sure. Either an error indicating you may not set a subclass'
private property or preferably the property to be set.
Actual result:
--------------
Crash.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39000&edit=1