ID: 39216
Comment by: judas dot iscariote 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:
reproduced with preg_replace_callback too .. ;-)
Previous Comments:
------------------------------------------------------------------------
[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:
---------------
<?php
$array = array('at least one element');
array_walk($array, array($nonesuchvar,'show'));
?>
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