1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/com_dotnet/tests/bug78694.phpt
Christoph M. Becker 45a7723267 Fix #78694: Appending to a variant array causes segfault
`write_dimension` object handlers have to be able to handle `NULL`
`offset`s; for now we simply throw an exception instead of following
the `NULL` pointer.
2019-10-19 11:47:00 +02:00

20 lines
479 B
PHP

--TEST--
Bug #78694 (Appending to a variant array causes segfault)
--SKIPIF--
<?php
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
?>
--FILE--
<?php
foreach ([new com('WScript.Shell'), new variant([])] as $var) {
try {
$var[] = 42;
} catch (com_exception $ex) {
var_dump($ex->getMessage());
}
}
?>
--EXPECT--
string(38) "appending to variants is not supported"
string(38) "appending to variants is not supported"