#43197 [Opn->Csd]: array_intersect_assoc() does not emit warning messages for error inputs
| From: | iliaa@php.net | Date: | Mon, 05 Nov 2007 23:55:27 +0000 |
| Subject: | #43197 [Opn->Csd]: array_intersect_assoc() does not emit warning messages for error inputs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119313@lists.php.net to get a copy of this message | ||
ID: 43197
Updated by: iliaa@php.net
Reported By: kraghuba at in dot ibm dot com
-Status: Open
+Status: Closed
Bug Type: Arrays related
Operating System: Linux, windows
PHP Version: 5.3CVS-2007-11-05 (snap)
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2007-11-05 12:58:06] kraghuba at in dot ibm dot com
Description:
------------
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:
---------------
<?php
$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
NULL
Warning: array_intersect_assoc(): at least 2 parameters are required, 1
given in %s on line %d
NULL
Actual result:
--------------
NULL
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43197&edit=1