#31083 [Opn->Bgs]: Fatal error on assigning reference to class variable in overloaded class

From: Date: Fri, 17 Dec 2004 18:27:49 +0000
Subject: #31083 [Opn->Bgs]: Fatal error on assigning reference to class variable in overloaded class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-70532@lists.php.net to get a copy of this message
ID: 31083 Updated by: sniper@php.net Reported By: olgo at city dot ee -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: windows XP SP2 PHP Version: 4.3.9 New Comment: Please read the error message. Previous Comments: ------------------------------------------------------------------------ [2004-12-14 08:59:34] olgo at city dot ee Description: ------------ standard windows php 4.3.9 apache 2 handler globals off. Assigning reference to class variable in overloaded class constructor/any method. Reproduce code: --------------- <?php # php 4.3.9 , apache 2.0.52 class containerClass { var $data; function containerClass(&$data) { $this->data =& $data; } function __set($prop_name, $prop_value) { return true; } } overload("containerClass"); $contentObject = new stdclass; $containerObject = new containerClass($contentObject); ?> Expected result: ---------------- blank page :D --- actually "fixed" the problem with using global directive, but it still seems to be a bug. So enjoy. Actual result: -------------- Fatal error: Cannot create references to/from string offsets nor overloaded objects in C:\Program Files\Apache Group\Apache2\htdocs\itabi\dev\kala.php on line 8 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31083&edit=1

« previous php.bugs (#70532) next »