mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
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.
17 lines
298 B
PHP
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
|