|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43197 array_intersect_assoc() does not emit warning messages for error inputs
Submitted: 2007-11-05 12:58 UTC Modified: 2007-11-05 23:55 UTC
From: kraghuba at in dot ibm dot com Assigned:
Status: Closed Package: Arrays related
PHP Version: 5.3CVS-2007-11-05 (snap) OS: Linux, windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 - 24 = ?
Subscribe to this entry?

 [2007-11-05 12:58 UTC] kraghuba at in dot ibm dot com
array_intersect_assoc() doesn't produce warning message when incorrect number of arguments are passed (i.e. Zero argument or one less than expected number of arguments).

This problem is applicable to php5.3 and php6 only. On php5 it generates  correct warning message.

Reproduce code:
$arr = array(1, 2, 3, 4);
var_dump( array_intersect_assoc() );
var_dump( array_intersect_assoc($arr) );

Expected result:
Warning: array_intersect_assoc(): at least 2 parameters are required, 0 given in %s on line %d

Warning: array_intersect_assoc(): at least 2 parameters are required, 1 given in %s on line %d

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-05 23:55 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 23 02:01:31 2019 UTC