From: [EMAIL PROTECTED]
Operating system: linux
PHP version: 4.2.1
PHP Bug Type: Variables related
Bug description: pass by reference in call_user_func
i've disabled the "call-time pass-by-reference" option in my configuration
file.
now, when trying to call_user_func a function with reference-parameters,
it won't work, unless i call-time-pass-by-reference my parameters despite
the warning.
( this bug might be related to bug #17246 )
here a small example:
function pass_by_reference( &$param ) {
$param[] = "another entry";
}
$data = array( "a first entry" );
call_user_func( "pass_by_reference", $data );
var_dump($data); // $data contains only one element ( "a first entry" ) (
== unexpected behaviour )
$data = array( "a first entry" );
call_user_func( "pass_by_reference", &$data ); // Warning: Call-time
pass-by-reference has been deprecated - argument passed by value; ...
var_dump($data); // $data contains both elements ( "a first entry",
"another entry" ) ( == expected behaviour )
--
Edit bug report at http://bugs.php.net/?id=17309&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17309&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17309&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17309&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17309&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17309&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17309&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17309&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17309&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17309&r=globals