#31214 [Opn]: overloading using __call() initially OK, fails on any subsequent method call
ID: 31214 User updated by: ebypdx at comcast dot net Reported By: ebypdx at comcast dot net Status: Open Bug Type: Class/Object related Operating System: Solaris 5.8 PHP Version: 4.3.10 New Comment: I've also seen it fail out with a different fatal error call to undefined function. i can't determine how to make it do this instead of giving call on a non-object. Previous Comments: [2004-12-21 02:26:26] ebypdx at comcast dot net Description: in the most simple case, create a class with no methods except __call() and overload it. start calling methods on an instance of that class. the first method call will hit __call() and finish correctly. any subsequent method calls will fail to hit __call(), resulting instead in a fatal error. if this is indeed a bug... i realize due to the experimental nature of overloading in 4.3, that this may never work again. my deepest thanks to anybody who can address this. Reproduce code: --- ?php class BaseOverloader { function BaseOverloader() {} function __call($method, $args, $returnValue) { echo Call to .get_class($this).-$method br/; $returnValue = return; return true; } } overload(BaseOverloader); $c = new BaseOverloader(); $c-firstCall(); $c-secondCall(); ? Expected result: Call to BaseOverloader-firstcall Call to BaseOverloader-secondcall Actual result: -- Call to baseoverloader-firstcall Fatal error: Call to a member function on a non-object in /export/vol01/opt/web/neby/partner.newedgenetworks.com/overloaded.php on line 13 -- Edit this bug report at http://bugs.php.net/?id=31214edit=1
#31214 [Opn]: overloading using __call() initially OK, fails on any subsequent method call
ID: 31214 Updated by: [EMAIL PROTECTED] Reported By: ebypdx at comcast dot net Status: Open Bug Type: Class/Object related Operating System: Solaris 5.8 PHP Version: 4.3.10 New Comment: a) make sure you are not using any Zend extension eg. Optimizer/xdebug/apc etc. have a look at this report http://bugs.php.net/?id=31106 see if reverting the mentioned change to zend_execute fixes this. Previous Comments: [2004-12-21 02:28:35] ebypdx at comcast dot net I've also seen it fail out with a different fatal error call to undefined function. i can't determine how to make it do this instead of giving call on a non-object. [2004-12-21 02:26:26] ebypdx at comcast dot net Description: in the most simple case, create a class with no methods except __call() and overload it. start calling methods on an instance of that class. the first method call will hit __call() and finish correctly. any subsequent method calls will fail to hit __call(), resulting instead in a fatal error. if this is indeed a bug... i realize due to the experimental nature of overloading in 4.3, that this may never work again. my deepest thanks to anybody who can address this. Reproduce code: --- ?php class BaseOverloader { function BaseOverloader() {} function __call($method, $args, $returnValue) { echo Call to .get_class($this).-$method br/; $returnValue = return; return true; } } overload(BaseOverloader); $c = new BaseOverloader(); $c-firstCall(); $c-secondCall(); ? Expected result: Call to BaseOverloader-firstcall Call to BaseOverloader-secondcall Actual result: -- Call to baseoverloader-firstcall Fatal error: Call to a member function on a non-object in /export/vol01/opt/web/neby/partner.newedgenetworks.com/overloaded.php on line 13 -- Edit this bug report at http://bugs.php.net/?id=31214edit=1
#31214 [Opn]: overloading using __call() initially OK, fails on any subsequent method call
ID: 31214 Updated by: [EMAIL PROTECTED] Reported By: ebypdx at comcast dot net Status: Open Bug Type: Class/Object related Operating System: Solaris 5.8 PHP Version: 4.3.10 New Comment: in Zend/zend_execute.c about line 997: remove this line PZVAL_UNLOCK(T-EA.data.overloaded_element.object); about line 1579: remove this line EX(object).ptr-refcount++; you have to copy paste the whole link for it to work / rather than just pressing on it. Previous Comments: [2004-12-21 02:45:16] ebypdx at comcast dot net i believe we aren't using any of those extensions. i will double-check with the sysadmin team. can you give me a tip on how to revert that change? when i follow the link to cvsweb from report 31106 i get a malformed query page. [2004-12-21 02:35:50] [EMAIL PROTECTED] a) make sure you are not using any Zend extension eg. Optimizer/xdebug/apc etc. have a look at this report http://bugs.php.net/?id=31106 see if reverting the mentioned change to zend_execute fixes this. [2004-12-21 02:28:35] ebypdx at comcast dot net I've also seen it fail out with a different fatal error call to undefined function. i can't determine how to make it do this instead of giving call on a non-object. [2004-12-21 02:26:26] ebypdx at comcast dot net Description: in the most simple case, create a class with no methods except __call() and overload it. start calling methods on an instance of that class. the first method call will hit __call() and finish correctly. any subsequent method calls will fail to hit __call(), resulting instead in a fatal error. if this is indeed a bug... i realize due to the experimental nature of overloading in 4.3, that this may never work again. my deepest thanks to anybody who can address this. Reproduce code: --- ?php class BaseOverloader { function BaseOverloader() {} function __call($method, $args, $returnValue) { echo Call to .get_class($this).-$method br/; $returnValue = return; return true; } } overload(BaseOverloader); $c = new BaseOverloader(); $c-firstCall(); $c-secondCall(); ? Expected result: Call to BaseOverloader-firstcall Call to BaseOverloader-secondcall Actual result: -- Call to baseoverloader-firstcall Fatal error: Call to a member function on a non-object in /export/vol01/opt/web/neby/partner.newedgenetworks.com/overloaded.php on line 13 -- Edit this bug report at http://bugs.php.net/?id=31214edit=1