Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.0a3

Bug #6687 array_intersect_key() fails due to func_get_args()
Submitted: 2006-02-03 16:48 UTC
From: daniel at easetechnology dot co dot uk Assigned: arpad
Status: Closed Package: PHP_Compat (version CVS)
PHP Version: 4.3.10 OS: Linux 2.4.20
Roadmaps: 1.6.0a1    
Subscription  


 [2006-02-03 16:48 UTC] daniel at easetechnology dot co dot uk
Description: ------------ Calling array_intersect_key fails with an error message: Fatal error: func_get_args(): Can't be used as a function parameter Other functions implemented in the same way may have the same bug; I haven't checked. Test script: --------------- <?php require_once 'lib/PHP/Compat/Function/array_intersect_key.php'; $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); print_r(php_compat_array_intersect_key($array1, $array2)); print_r(array_intersect_key( array('a'=>1, 'b'=>2, 'c'=>3, 'd'=>4), array('a'=>0, 'c'=>0), array('a'=>0, 'd'=>4) )); ?> Expected result: ---------------- no error messages Actual result: -------------- Array ( [blue] => 1 [green] => 3 ) Fatal error: func_get_args(): Can't be used as a function parameter in /home/davidhall/public_html/mercury/lib/PHP/Compat/Function/array_intersect_key.php on line 67

Comments

 [2006-02-07 11:48 UTC] arpad
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.