ID: 39337
User updated by: phpbugs at thequod dot de
Reported By: phpbugs at thequod dot de
Status: Bogus
Bug Type: Arrays related
Operating System: Ubuntu Linux
PHP Version: 5CVS-2006-11-01 (CVS)
New Comment:
I cannot believe that I've not seen the Notice before, but
now I do. Sorry.
Previous Comments:
------------------------------------------------------------------------
[2007-01-17 21:02:28] [EMAIL PROTECTED]
Ilia is talking about this warning:
Notice: Indirect modification of overloaded property A::$foo has no
effect
------------------------------------------------------------------------
[2007-01-14 05:26:37] phpbugs at thequod dot de
ilia, which warning are you talking about? There's no
(PHP) warning?!
All I want to say is: overloading of arrays by
e.g. "$Foo->bar[] = 1" does not work, if $bar is not
defined as a member in the class definition (without a
value, of course).
------------------------------------------------------------------------
[2007-01-07 21:57:20] [EMAIL PROTECTED]
foo property is not actually created, hence the warning.
------------------------------------------------------------------------
[2007-01-07 19:31:07] phpbugs at thequod dot de
iliaa, thanks for taking the time to look at this.
Unfortunately I don't understand your note. A::$foo is
overloaded in class B and there it shows the IMHO correct
behaviour (because in class B there's "var $foo").
The expected result in the last code example would have
been:
A: ----------------
array(1) {
[0]=>
int(1)
}
B: ----------------
array(1) {
[0]=>
int(1)
}
instead of:
A: ----------------
array(0) {
}
B: ----------------
array(1) {
[0]=>
int(1)
}
------------------------------------------------------------------------
[2007-01-07 04:10:47] [EMAIL PROTECTED]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
Notice: Indirect modification of overloaded property A::$foo
has no effect.
This is why the assignment has no effect.
------------------------------------------------------------------------
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/39337
--
Edit this bug report at http://bugs.php.net/?id=39337&edit=1