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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!