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/bug79248.phpt
Christoph M. Becker f649adedfe Fix #79248: Traversing empty VT_ARRAY throws com_exception
If the `VT_ARRAY` is empty, i.e. its upperbound is less than its lower
bound, we must not call `php_com_safearray_get_elem()`, because that
function throws in this case.
2020-02-08 17:05:29 +01:00

17 lines
298 B
PHP

--TEST--
Bug #79248 (Traversing empty VT_ARRAY throws com_exception)
--SKIPIF--
<?php
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
?>
--FILE--
<?php
$v = new variant([], VT_ARRAY);
foreach ($v as $el) {
var_dump($el);
}
echo "done\n";
?>
--EXPECT--
done