cvs: php4 /ext/com COM.c
| From: | Harald Radi | Date: | Tue, 14 Aug 2001 00:28:53 +0000 |
| Subject: | cvs: php4 /ext/com COM.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6808@lists.php.net to get a copy of this message | ||
phanto Mon Aug 13 20:28:53 2001 EDT
Modified files:
/php4/ext/com COM.c
Log:
make next() return a single value instead of an array with one element
Index: php4/ext/com/COM.c
diff -u php4/ext/com/COM.c:1.41 php4/ext/com/COM.c:1.42
--- php4/ext/com/COM.c:1.41 Mon Aug 13 19:39:10 2001
+++ php4/ext/com/COM.c Mon Aug 13 20:28:53 2001
@@ -741,6 +741,15 @@
}
}
+ /* 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"))