blob: b94e7093640600c40d2d0561ae6da74796a9bfef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Bug #40191 (use of array_unique() with objects triggers segfault)
--FILE--
<?php
$arrObj = new ArrayObject();
$arrObj->append('foo');
$arrObj->append('bar');
$arrObj->append('foo');
try {
$arr = array_unique($arrObj);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
echo "Done\n";
?>
--EXPECT--
array_unique() expects parameter 1 to be array, object given
Done
|