php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44212 array_diff_assoc not reporting missing arguments
Submitted: 2008-02-22 12:11 UTC Modified: 2008-02-22 13:32 UTC
From: nicholsr@php.net Assigned:
Status: Closed Package: Arrays related
PHP Version: 5.3CVS-2008-02-22 (snap) OS:
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicholsr@php.net
New email:
PHP Version: OS:

 

 [2008-02-22 12:11 UTC] nicholsr@php.net
Description:
------------
array_diff_assoc is not reporting missing arguments - see example code



Reproduce code:
---------------
var_dump( array_diff_assoc() );
$arr1 = array(1, 2);
var_dump( array_diff_assoc($arr1) );


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

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

Actual result:
--------------
NULL
NULL

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-22 13:32 UTC] felipe@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC