|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: kraghuba at in dot ibm dot com
New email:
PHP Version: OS:


 [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-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 21 20:01:23 2020 UTC