body->type = type;
body->free = free;
+ body->priv = 0;
body->data = data;
body->size = size;
if (Z_TYPE_PP(data) != IS_ARRAY) {
http_error(HE_NOTICE, HTTP_E_INVALID_PARAM, "Unrecognized type of post file array entry");
- } else if ( SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "name", sizeof("name"), (void **) &name) ||
- SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **) &type) ||
- SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "file", sizeof("file"), (void **) &file)) {
+ } else if ( SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "name", sizeof("name"), (void *) &name) ||
+ SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void *) &type) ||
+ SUCCESS != zend_hash_find(Z_ARRVAL_PP(data), "file", sizeof("file"), (void *) &file)) {
http_error(HE_NOTICE, HTTP_E_INVALID_PARAM, "Post file array entry misses either 'name', 'type' or 'file' entry");
} else {
CURLcode err;
{
if (body) {
if (body->free) {
- switch (body->type)
- {
+ switch (body->type) {
case HTTP_REQUEST_BODY_CSTRING:
if (body->data) {
efree(body->data);
}
- break;
+ break;
case HTTP_REQUEST_BODY_CURLPOST:
curl_formfree(body->data);
- break;
+ break;
case HTTP_REQUEST_BODY_UPLOADFILE:
php_stream_close(body->data);
- break;
+ break;
}
}
memset(body, 0, sizeof(http_request_body));