From: ilewis at uk dot ibm dot com Operating system: fedora 8 PHP version: 5.3CVS-2008-07-23 (snap) PHP Bug Type: Unknown/Other Function Bug description: array_uintersect_assoc gives incorrect error message
Description: ------------ If you run array_uintersect_assoc and give it an invalid callback for the third argument, you get two error messages. The second one is unnecessary, but it is also wrong as it tells you that you need to pass 3 parameters and that you've actually passed 3. I've written a patch for array.c to fix it which I've put on pastebin: http://pastebin.com/m49c46604 Reproduce code: --------------- <?php var_dump(array_uintersect_assoc(array(1), array(1), array(1))); ?> Expected result: ---------------- Warning: array_uintersect_assoc() expects parameter 3 to be a valid callback, array must have exactly two members in Command line code on line 1 NULL Actual result: -------------- Warning: array_uintersect_assoc() expects parameter 3 to be a valid callback, array must have exactly two members in Command line code on line 1 Warning: array_uintersect_assoc(): at least 3 parameters are required, 3 given in Command line code on line 1 NULL -- Edit bug report at http://bugs.php.net/?id=45605&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45605&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45605&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45605&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45605&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45605&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45605&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45605&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45605&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45605&r=support Expected behavior: http://bugs.php.net/fix.php?id=45605&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45605&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45605&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45605&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45605&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45605&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45605&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45605&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45605&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45605&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45605&r=mysqlcfg