ID: 32350 Updated by: [EMAIL PROTECTED] Reported By: wb at pro-net dot co dot uk -Status: Open +Status: Closed Bug Type: *General Issues Operating System: FreeBSD 5.2.1 PHP Version: 5.0.3 New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-03-17 12:56:28] wb at pro-net dot co dot uk Description: ------------ When trying to use call_user_func_array() to call a parent method php calls the current class method and therefore goes into a loop. Reproduce code: --------------- <?php class a { public function xyz () { $args = func_get_args(); print("\n\na:\n"); var_export($args); } } class b extends a { public function xyz () { $args = func_get_args(); print("\n\nb:\n"); var_export($args); call_user_func_array(array('parent', 'xyz'), $args); } } $b = new b(); $b->xyz('zero', 'one', 'two', 'three', 'four'); ?> Expected result: ---------------- b: array ( 0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', ) a: array ( 0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', ) Actual result: -------------- b: array ( 0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', ) b: array ( 0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', ) b: array ( 0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', ) ... [Inf loop] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32350&edit=1