projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
1041b48
)
missed that part
author
Michael Wallner
<mike@php.net>
Thu, 22 Dec 2005 09:12:06 +0000
(09:12 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 22 Dec 2005 09:12:06 +0000
(09:12 +0000)
http_request_object.c
patch
|
blob
|
history
diff --git
a/http_request_object.c
b/http_request_object.c
index 7706fd7ef1cd45df6c46532d464d707c41973a9a..5d02c3e7f862b8dee04bd611fc6f8b34db1eaf6b 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-1386,24
+1386,17
@@
PHP_METHOD(HttpRequest, addPostFile)
*/
PHP_METHOD(HttpRequest, setPostFiles)
{
*/
PHP_METHOD(HttpRequest, setPostFiles)
{
- zval *files, *post;
+ zval *files
= NULL
, *post;
getObject(http_request_object, obj);
getObject(http_request_object, obj);
- if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/", &files)) {
+ if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a
!
/", &files)) {
RETURN_FALSE;
}
RETURN_FALSE;
}
- post = GET_PROP(obj, postFiles);
- if (Z_TYPE_P(post) == IS_NULL) {
- MAKE_STD_ZVAL(post);
- array_init(post);
- } else {
- SEPARATE_ZVAL(&post);
- }
-
- zend_hash_clean(Z_ARRVAL_P(post));
- if (files && zend_hash_num_elements(Z_ARRVAL_P(files))) {
- array_copy(files, post);
+ MAKE_STD_ZVAL(post);
+ array_init(post);
+ if (files && (Z_TYPE_P(files) == IS_ARRAY)) {
+ array_copy(files, post)
}
SET_PROP(obj, postFiles, post);
}
SET_PROP(obj, postFiles, post);