summaryrefslogtreecommitdiff
path: root/ext/com/COM.c
diff options
context:
space:
mode:
authorHarald Radi <phanto@php.net>2001-08-14 00:28:54 +0000
committerHarald Radi <phanto@php.net>2001-08-14 00:28:54 +0000
commitd041982a9cf997be970d65b3955ad7895dc0c44f (patch)
tree00731406369f32f03a0e72a9472b7db0d2c757d7 /ext/com/COM.c
parentf7c0bc955cb87ad4c73947eb020c57b88968ff57 (diff)
downloadphp-git-d041982a9cf997be970d65b3955ad7895dc0c44f.tar.gz
make next() return a single value instead of an array with one element
Diffstat (limited to 'ext/com/COM.c')
-rw-r--r--ext/com/COM.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/com/COM.c b/ext/com/COM.c
index 0063f426b1..aeae84ddcf 100644
--- a/ext/com/COM.c
+++ b/ext/com/COM.c
@@ -741,6 +741,15 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
}
}
+ /* return a single element if next() was called without count */
+ if((arg_count == 0) && (count == 1))
+ {
+ long index[] = {1};
+
+ SafeArrayGetElement(pSA, index, var_result);
+ SafeArrayDestroy(pSA);
+ }
+
return SUCCESS;
}
else if(C_HASENUM(obj) && strstr(Z_STRVAL_P(function_name), "reset"))