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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 01:01:28 2024 UTC