ID: 39449
Updated by: dmitry@php.net
Reported By: pstradomski at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 5.2.0
Assigned To: dmitry
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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...
------------------------------------------------------------------------
[2008-01-22 16:36:36] lsmith@php.net
I am still seeing this issue on PHP 5.2.5.
Here is a link to a PEAR class affected:
http://pear.php.net/bugs/bug.php?id=10702
The method in question can be found here:
http://pear.php.net/package/XML_Feed_Parser/docs/latest/__filesource/f
source_XML_Feed_Parser__XML_Feed_Parser-1.0.2ParserType.php.html#a189
Changing
$this->idMappings[$id] = $this->entries[$offset];
to
$mappings = $this->idMappings;
$mappings[$id] = $this->entries[$offset];
$this->idMappings = $mappings;
fixes the notice ..
------------------------------------------------------------------------
[2007-01-10 16:01:10] dmitry@php.net
Fixed in CVS HEAD and PHP_5_2.
------------------------------------------------------------------------
[2007-01-06 10:19:01] slavikus at gmail dot com
I do agree with the brjann points and also vote for this
behavior to be fixed; there's no way for me to knowing if any
particular property is overloaded or not, neither it is right
to treat them differently from any other properties.
------------------------------------------------------------------------
[2006-12-22 12:20:30] tim dot pickup at gmail dot com
Just adding a comment to say this "feature" is also going to cause me a
lot of pain changing code.
Any reason it is "expected behaviour" or do we just get a 4 word reply
basically saying **** you ?
------------------------------------------------------------------------
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