From: sprice at wisc dot edu
Operating system: OS X 10.2.6
PHP version: 4.3.3
PHP Bug Type: Unknown/Other Function
Bug description: call_user_func_array corrupts the passed array
Description:
------------
call_user_func_array seems to corrupt the array that is
passed to the user function through it.
If an array of two strings are passed, and you try to
print $strings[0] you get the first letter of the first
element. If you try to print $strings[1] you get the
2nd letter of the first element.
Reproduce code:
---------------
<?php
function test($testing){
echo $testing[1];
}
$array = array('im testing', 'hello?');
call_user_func_array('test', $array);
echo "\n";
echo $array[1];
?>
Expected result:
----------------
hello?
hello?
Actual result:
--------------
m
hello?
--
Edit bug report at http://bugs.php.net/?id=25526&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25526&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25526&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25526&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25526&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25526&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25526&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25526&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25526&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25526&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25526&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25526&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25526&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25526&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25526&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25526&r=gnused