summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/tests/bug34272.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet/tests/bug34272.phpt')
-rw-r--r--ext/com_dotnet/tests/bug34272.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/com_dotnet/tests/bug34272.phpt b/ext/com_dotnet/tests/bug34272.phpt
new file mode 100644
index 0000000..3a65e2c
--- /dev/null
+++ b/ext/com_dotnet/tests/bug34272.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #34272 (empty array onto COM object blows up)
+--SKIPIF--
+<?php
+if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?>
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+try {
+ $dict = new COM("Scripting.Dictionary");
+ $dict->add('foo', array());
+ print sizeof($dict['foo'])."\n";
+ $dict->add('bar', array(23));
+ print sizeof($dict['bar'])." \n";
+} catch (Exception $e) {
+ print $e;
+}
+?>
+--EXPECT--
+0
+1