ID:               39449
 Comment by:       mail at jfcom dot de
 Reported By:      pstradomski at gmail dot com
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      5.2.0
 Assigned To:      dmitry
 New Comment:

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...


Previous Comments:
------------------------------------------------------------------------

[2008-01-22 16:36:36] [EMAIL PROTECTED]

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] [EMAIL PROTECTED]

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 ?

------------------------------------------------------------------------

[2006-12-15 19:32:06] davidm at marketo dot com

I agree strongly with brjann's analysis.  Once the language allows
overloaded properties on an object, it's completely confusing to say
that overloaded array properties are immutable while all other property
types are mutable, and also that non-overloaded array properties can be
iterated with foreach but overloaded array properties cannot be
iterated.

I've got a significant amount of code that will have to be rewritten
because of this change.  The symfony framework encourages a design
pattern that uses overloaded properties on the action objects and any
instances where the overloaded property is an array are now broken. 

Other symfony users have run into the problem as well
(http://www.symfony-project.com/forum/index.php/m/15684/#msg_15684).

David Morandi

------------------------------------------------------------------------

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

Reply via email to