|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-30 12:40 UTC] bjori@php.net
[2006-10-08 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
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.