#31214 [NoF]: overloading using __call() initially OK, fails on any subsequent method call
| From: | alan_k@php.net | Date: | Fri, 07 Jan 2005 08:01:23 +0000 |
| Subject: | #31214 [NoF]: overloading using __call() initially OK, fails on any subsequent method call | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-71551@lists.php.net to get a copy of this message | ||
ID: 31214
Updated by: alan_k@php.net
Reported By: ebypdx at comcast dot net
Status: No Feedback
Bug Type: Class/Object related
Operating System: Solaris 5.8
PHP Version: 4.3.10
New Comment:
try snaps.php.net - this should be fixed now.
Previous Comments:
------------------------------------------------------------------------
[2005-01-07 03:41:33] patrick at arkeon dot com
A "not real" solution about the "Call to a member function on a
non-object"
Try this:
// Only to avoid the problem...
class Dummy {
function Dummy() {
}
}
$toto =& new Dummy();
class BaseOverloader {
function BaseOverloader() {}
function __call($method, $args, &$returnValue) {
echo "Call to ".get_class($this)."->$method <br/>";
$returnValue = "return";
return true;
}
}
overload("BaseOverloader");
$toto = new BaseOverloader();
$toto->firstCall();
$toto->secondCall();
Then you got:
Call to baseoverloader->firstcall
Call to baseoverloader->secondcall
Weird, no?!?
------------------------------------------------------------------------
[2004-12-29 01:00:16] 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".
------------------------------------------------------------------------
[2004-12-21 18:05:49] iliaa@php.net
leave bug @ feedback until further information is known.
------------------------------------------------------------------------
[2004-12-21 17:33:51] ebypdx at comcast dot net
thanks very much for the feedback, if our sysadmins have time to apply
that patch i'll post back the results. for now we've rolled back a
version.
------------------------------------------------------------------------
[2004-12-21 03:58:03] iliaa@php.net
Try the patch listed in bug report #31106
------------------------------------------------------------------------
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/31214
--
Edit this bug report at http://bugs.php.net/?id=31214&edit=1