#39449 [NoF->Opn]: Overloaded array properties do not work correctly

From: Date: Mon, 21 Jul 2008 11:33:32 +0000
Subject: #39449 [NoF->Opn]: Overloaded array properties do not work correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-127045@lists.php.net to get a copy of this message
ID: 39449 User updated by: pstradomski at gmail dot com Reported By: pstradomski at gmail dot com -Status: No Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.2.0 Assigned To: dmitry New Comment: Works correctly for me on 5.2.6. Did you forget to add the & before __get definition? Previous Comments: ------------------------------------------------------------------------ [2008-07-21 09:45:21] adam at limabean dot co dot za Still not fixed in 5.2.5 ------------------------------------------------------------------------ [2008-07-03 22:16:08] fkwin at web dot de Not fixed in PHP 5.2.4. Is there any plan to fix this bug? I entirely agree with brjann that "normal" and overloaded properties should behave the same. Overloaded array properties should be possible. ------------------------------------------------------------------------ [2008-02-06 01:00:00] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2008-01-29 11:31:17] dmitry@php.net The original test-cases from first post and from [19 Nov 2006 11:53am UTC] work fine for me. The following code is not covered by this. $this->idMappings[$id] = $this->entries[$offset]; The warning message is expected here. You can fix it by redefining __get() with return by reference. ------------------------------------------------------------------------ [2008-01-24 16:42:14] mail at jfcom dot de For me it's hard to understand, what it should be, that you call fixed. I searched quite a while, but I came to the conclusion, that fixing was just closing the thread? If it stays as it is, the overloading in case of __get and __set is completely useless, because noone limits himself to simple variables or uses such sick constructs. Is it really the solution to read the whole array, modify it the way you need and write it back as lsmith posted? Come on... ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39449 -- Edit this bug report at http://bugs.php.net/?id=39449&edit=1

« previous php.bugs (#127045) next »