diff options
author | Harald Radi <phanto@php.net> | 2001-08-14 00:28:54 +0000 |
---|---|---|
committer | Harald Radi <phanto@php.net> | 2001-08-14 00:28:54 +0000 |
commit | d041982a9cf997be970d65b3955ad7895dc0c44f (patch) | |
tree | 00731406369f32f03a0e72a9472b7db0d2c757d7 /ext/com/COM.c | |
parent | f7c0bc955cb87ad4c73947eb020c57b88968ff57 (diff) | |
download | php-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.c | 9 |
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")) |