#39216 [Asn]: call_user_func and friends don't accept array($this, "func") callback anymore
ID: 39216 Updated by: [EMAIL PROTECTED] Reported By: hannes dot magnusson at gmail dot com Status: Assigned Bug Type: Scripting Engine problem Operating System: FreeBSD PHP Version: 6CVS-2006-10-20 (CVS) Assigned To: helly New Comment: Can someone enlighten me how the reproduce code is supposed to do anything? You can't call methods on non-existing objects... Previous Comments: [2007-04-23 13:26:34] [EMAIL PROTECTED] The Zend/tests/bug19859.phpt is still broken, others seem to be fixed. Marcus, your fcall_info stuff breaks it, please look into it. I tried to fix it, but got lost in the code you wrote. zend_call_function() should detect if __call() is used and pass the real function name as the first param. [2006-10-21 16:15:43] hannes dot magnusson at gmail dot com ext/standard/tests/general_functions/bug35229.php #0 0x083aaf1e in zend_call_function (fci=0xbfbfd010, fci_cache=0xbfbfd000, tsrm_ls=0x85742e0) at /usr/src/php/6.0/Zend/zend_execute_API.c:957 #1 0x082a3082 in zif_call_user_func (ht=31, return_value=0x87f395c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, tsrm_ls=0x85742e0) at /usr/src/php/6.0/ext/standard/basic_functions.c:5030 #2 0x083e9da1 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at zend_vm_execute.h:209 #3 0x083ef52c in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at zend_vm_execute.h:1648 #4 0x083e98d1 in execute (op_array=0x87f19c8, tsrm_ls=0x85742e0) at zend_vm_execute.h:92 #5 0x083bee9e in zend_execute_scripts (type=8, tsrm_ls=0x85742e0, retval=0x0, file_count=3) at /usr/src/php/6.0/Zend/zend.c:1616 #6 0x08356e16 in php_execute_script (primary_file=0xbfbfe900, tsrm_ls=0x85742e0) at /usr/src/php/6.0/main/main.c:1922 #7 0x084382f3 in main (argc=2, argv=0xbfbfe974) at /usr/src/php/6.0/sapi/cli/php_cli.c:1119 [2006-10-21 08:44:38] judas dot iscariote at gmail dot com reproduced with preg_replace_callback too .. ;-) [2006-10-20 17:00:35] hannes dot magnusson at gmail dot com Description: call_user_func()/array_walk() doesn't accept array($obj, "func") callback anymore... (See Zend/tests/bug31720.phpt && Zend/tests/bug19859.phpt) Reproduce code: --- Expected result: Notice: Undefined variable: nonesuchvar in %s on line %d Notice: Non-callable array passed to zend_call_function() in %s on line %d Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d Actual result: -- Notice: Undefined variable: nonesuchvar in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 Warning: array_walk() expects parameter 2 to be valid callback, array given in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 -- Edit this bug report at http://bugs.php.net/?id=39216&edit=1
#39216 [Asn]: call_user_func and friends don't accept array($this, "func") callback anymore
ID: 39216 Updated by: [EMAIL PROTECTED] Reported By: hannes dot magnusson at gmail dot com Status: Assigned Bug Type: *Programming Data Structures Operating System: FreeBSD PHP Version: 6CVS-2006-10-20 (CVS) -Assigned To: pollita +Assigned To: helly New Comment: The Zend/tests/bug19859.phpt is still broken, others seem to be fixed. Marcus, your fcall_info stuff breaks it, please look into it. I tried to fix it, but got lost in the code you wrote. zend_call_function() should detect if __call() is used and pass the real function name as the first param. Previous Comments: [2006-10-21 16:15:43] hannes dot magnusson at gmail dot com ext/standard/tests/general_functions/bug35229.php #0 0x083aaf1e in zend_call_function (fci=0xbfbfd010, fci_cache=0xbfbfd000, tsrm_ls=0x85742e0) at /usr/src/php/6.0/Zend/zend_execute_API.c:957 #1 0x082a3082 in zif_call_user_func (ht=31, return_value=0x87f395c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, tsrm_ls=0x85742e0) at /usr/src/php/6.0/ext/standard/basic_functions.c:5030 #2 0x083e9da1 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at zend_vm_execute.h:209 #3 0x083ef52c in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at zend_vm_execute.h:1648 #4 0x083e98d1 in execute (op_array=0x87f19c8, tsrm_ls=0x85742e0) at zend_vm_execute.h:92 #5 0x083bee9e in zend_execute_scripts (type=8, tsrm_ls=0x85742e0, retval=0x0, file_count=3) at /usr/src/php/6.0/Zend/zend.c:1616 #6 0x08356e16 in php_execute_script (primary_file=0xbfbfe900, tsrm_ls=0x85742e0) at /usr/src/php/6.0/main/main.c:1922 #7 0x084382f3 in main (argc=2, argv=0xbfbfe974) at /usr/src/php/6.0/sapi/cli/php_cli.c:1119 [2006-10-21 08:44:38] judas dot iscariote at gmail dot com reproduced with preg_replace_callback too .. ;-) [2006-10-20 17:00:35] hannes dot magnusson at gmail dot com Description: call_user_func()/array_walk() doesn't accept array($obj, "func") callback anymore... (See Zend/tests/bug31720.phpt && Zend/tests/bug19859.phpt) Reproduce code: --- Expected result: Notice: Undefined variable: nonesuchvar in %s on line %d Notice: Non-callable array passed to zend_call_function() in %s on line %d Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d Actual result: -- Notice: Undefined variable: nonesuchvar in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 Warning: array_walk() expects parameter 2 to be valid callback, array given in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 -- Edit this bug report at http://bugs.php.net/?id=39216&edit=1
#39216 [Asn]: call_user_func and friends don't accept array($this, "func") callback anymore
ID: 39216 User updated by: hannes dot magnusson at gmail dot com Reported By: hannes dot magnusson at gmail dot com Status: Assigned Bug Type: *Programming Data Structures Operating System: FreeBSD PHP Version: 6CVS-2006-10-20 (CVS) Assigned To: pollita New Comment: ext/standard/tests/general_functions/bug35229.php #0 0x083aaf1e in zend_call_function (fci=0xbfbfd010, fci_cache=0xbfbfd000, tsrm_ls=0x85742e0) at /usr/src/php/6.0/Zend/zend_execute_API.c:957 #1 0x082a3082 in zif_call_user_func (ht=31, return_value=0x87f395c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, tsrm_ls=0x85742e0) at /usr/src/php/6.0/ext/standard/basic_functions.c:5030 #2 0x083e9da1 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at zend_vm_execute.h:209 #3 0x083ef52c in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfbfd170, tsrm_ls=0x85742e0) at zend_vm_execute.h:1648 #4 0x083e98d1 in execute (op_array=0x87f19c8, tsrm_ls=0x85742e0) at zend_vm_execute.h:92 #5 0x083bee9e in zend_execute_scripts (type=8, tsrm_ls=0x85742e0, retval=0x0, file_count=3) at /usr/src/php/6.0/Zend/zend.c:1616 #6 0x08356e16 in php_execute_script (primary_file=0xbfbfe900, tsrm_ls=0x85742e0) at /usr/src/php/6.0/main/main.c:1922 #7 0x084382f3 in main (argc=2, argv=0xbfbfe974) at /usr/src/php/6.0/sapi/cli/php_cli.c:1119 Previous Comments: [2006-10-21 08:44:38] judas dot iscariote at gmail dot com reproduced with preg_replace_callback too .. ;-) [2006-10-20 17:00:35] hannes dot magnusson at gmail dot com Description: call_user_func()/array_walk() doesn't accept array($obj, "func") callback anymore... (See Zend/tests/bug31720.phpt && Zend/tests/bug19859.phpt) Reproduce code: --- Expected result: Notice: Undefined variable: nonesuchvar in %s on line %d Notice: Non-callable array passed to zend_call_function() in %s on line %d Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d Actual result: -- Notice: Undefined variable: nonesuchvar in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 Warning: array_walk() expects parameter 2 to be valid callback, array given in /usr/src/php/6.0/Zend/tests/bug31720.php on line 4 -- Edit this bug report at http://bugs.php.net/?id=39216&edit=1