X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_body_api.c;h=fcaa635d00f54603a9ba1c820aa944e70427cef1;hp=dd76edb47053b18d52b03499464f72f08059b43b;hb=669d2e6a8bdc642b6b52693f4593f199ddd7e8d2;hpb=8d980e09a008a1c223be1a068ab522750f8bbdad diff --git a/http_request_body_api.c b/http_request_body_api.c index dd76edb..fcaa635 100644 --- a/http_request_body_api.c +++ b/http_request_body_api.c @@ -85,9 +85,9 @@ PHP_HTTP_API http_request_body *_http_request_body_fill(http_request_body *body, 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;