#43196 [Csd]: array_intersect_assoc() generates segmentation fault with non-array input(s)
| From: | kraghuba at in dot ibm dot com | Date: | Tue, 06 Nov 2007 14:45:59 +0000 |
| Subject: | #43196 [Csd]: array_intersect_assoc() generates segmentation fault with non-array input(s) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119330@lists.php.net to get a copy of this message | ||
ID: 43196
User updated by: kraghuba at in dot ibm dot com
Reported By: kraghuba at in dot ibm dot com
Status: Closed
Bug Type: Arrays related
Operating System: Linux, windows
PHP Version: 5.3CVS-2007-11-05 (snap)
New Comment:
thanks Jani. Tests for array_diff_assoc() is going to be there soon.
Previous Comments:
------------------------------------------------------------------------
[2007-11-06 13:33:19] jani@php.net
Fixed in CVS. I think the same bug was with array_diff_assoc() as well.
But I fixed that too. (no test for it yet?)
------------------------------------------------------------------------
[2007-11-06 13:02:29] jani@php.net
Fix underway.
------------------------------------------------------------------------
[2007-11-05 12:53:15] kraghuba at in dot ibm dot com
Description:
------------
array_intersect_assoc() generates segmentation fault when any of its
argument is given as non array. There is no warning message issued
indicating that an array should be passed.
This problem is noticed with the drivers after 18th Oct 2007.
Applicable to php5.2, php5.3 and php6.
Reproduce code:
---------------
<?php
$arr = array(1, 2, 3, 4);
$val = 1234;
var_dump( array_intersect_assoc($arr, $val) );
?>
Expected result:
----------------
Warning: array_intersect(): Argument #2 is not an array in %s on line
%d
NULL
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43196&edit=1