- http_error_ex(E_WARNING, HTTP_E_CURL, "Unkown request body type: %d", body->type);
+ http_error_ex(E_WARNING, HTTP_E_CURL, "Unknown request body type: %d", body->type);
if (SUCCESS != zend_hash_index_find(&HTTP_G(request).methods.custom, HTTP_CUSTOM_REQUEST_METHOD(method), (void **) &zmethod)) {
http_error_ex(E_NOTICE, HTTP_E_PARAM, "Request method with id %lu does not exist", method);
return FAILURE;
}
spprintf(&http_method, 0, "HTTP_%s", Z_STRVAL_PP(zmethod));
if (SUCCESS != zend_hash_index_find(&HTTP_G(request).methods.custom, HTTP_CUSTOM_REQUEST_METHOD(method), (void **) &zmethod)) {
http_error_ex(E_NOTICE, HTTP_E_PARAM, "Request method with id %lu does not exist", method);
return FAILURE;
}
spprintf(&http_method, 0, "HTTP_%s", Z_STRVAL_PP(zmethod));
if ( (SUCCESS != zend_hash_index_del(&HTTP_G(request).methods.custom, HTTP_CUSTOM_REQUEST_METHOD(method)))
|| (SUCCESS != zend_hash_del(EG(zend_constants), http_method, strlen(http_method) + 1))) {
http_error_ex(E_NOTICE, 0, "Could not unregister request method: %s", http_method);
efree(http_method);
return FAILURE;
}
if ( (SUCCESS != zend_hash_index_del(&HTTP_G(request).methods.custom, HTTP_CUSTOM_REQUEST_METHOD(method)))
|| (SUCCESS != zend_hash_del(EG(zend_constants), http_method, strlen(http_method) + 1))) {
http_error_ex(E_NOTICE, 0, "Could not unregister request method: %s", http_method);
efree(http_method);
return FAILURE;
}