ID:               41641
 User updated by:  asnyder at mddev dot com
 Reported By:      asnyder at mddev dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Linux Fedora Core 4
 PHP Version:      5.2.3
 New Comment:

Ok, HOW is this code, or code like it "WRONG"? The code has the desired
effect. The purpose of the code is to allow the user to call a function
via the __set, __get without having to actually call the actual
function. For instance, if one would want to have properties. Regardless
of what you think the code should be, the code has the effect that the
developer wanted, thus the code is not wrong, it's just confusing to
you.

What EXACTLY is wrong with this code? What effect is it having that is
not the desired effect?


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

[2007-06-25 19:43:22] [EMAIL PROTECTED]

>But it DOES have an affect.
But the code is STILL wrong, that's what the warning is trying to tell
you.

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

[2007-06-25 19:39:07] asnyder at mddev dot com

But it DOES have an affect. It did change the SomeVariable value of the
actual object regardless of the __get returning by value. In these
situations it should NOT trigger the warning. Run the example, and store
values in the SomeVariable, you'll see that the actual value DOES get
changed. Lets not just assume things without atually reading and running
the example. If you were in this situation you would most definately not
want it to throw this warning. Realize that much of the Web 2.0 movement
using php relise on the __get, and __set methods, and in throwing this
warning higly discourages it's use, even when the application of it,
such as my example is perfectly legitimate and valid.

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

[2007-06-25 19:11:26] [EMAIL PROTECTED]

The __get() function returns by value, not by reference, hence the
warning.

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

[2007-06-11 14:57:33] asnyder at mddev dot com

How is this bogus? The code DOES indeed make a change. Why should one
have to call SetSomething, instead of the automatic __set triggering and
making the modification.

I don't understand your logic. I have many applications that use this
logic, and the applicatios worked properly before, with the new notice
they don't, unless I explicitly call the function.

What are your thoughts on this?

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

[2007-06-11 14:52:51] [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

It did not properly work in PHP 5.1.x either, now we emit this warning
so that you can deal with the broken code.

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

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/41641

-- 
Edit this bug report at http://bugs.php.net/?id=41641&edit=1

Reply via email to