1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/standard/tests/array/bug40191.phpt
2019-03-11 11:32:20 +01:00

22 lines
389 B
PHP

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