projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- require libz >= 1.2.0.4
[m6w6/ext-http]
/
http_request_object.c
diff --git
a/http_request_object.c
b/http_request_object.c
index 6b0d6b076bcefdb1db4504a07c7fd3d3e09085c6..a3b132eeaaae4b4b60d50de558feb1777ad58101 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-1196,7
+1196,7
@@
PHP_METHOD(HttpRequest, setPostFields)
MAKE_STD_ZVAL(post);
array_init(post);
MAKE_STD_ZVAL(post);
array_init(post);
- if (post_data &&
(Z_TYPE_P(post_data) == IS_ARRAY
)) {
+ if (post_data &&
zend_hash_num_elements(Z_ARRVAL_P(post_data)
)) {
array_copy(post_data, post);
}
SET_PROP(obj, postFields, post);
array_copy(post_data, post);
}
SET_PROP(obj, postFields, post);
@@
-1359,6
+1359,7
@@
PHP_METHOD(HttpRequest, addPostFile)
}
add_next_index_zval(new_post, entry);
SET_PROP(obj, postFiles, new_post);
}
add_next_index_zval(new_post, entry);
SET_PROP(obj, postFiles, new_post);
+ zval_ptr_dtor(&new_post);
RETURN_TRUE;
}
RETURN_TRUE;
}