X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=http_functions.c;h=0dfb68bcf9747e9554d7392a21a8814f0d839087;hb=614f707afdcca47e4cc6cdd5eb8926c363be909f;hp=ceac1a1eee4bbb3d9797e0c0df87149138fd4196;hpb=2763e49af54ef5a317337457a993476c18cb4bfb;p=m6w6%2Fext-http diff --git a/http_functions.c b/http_functions.c index ceac1a1..0dfb68b 100644 --- a/http_functions.c +++ b/http_functions.c @@ -1097,16 +1097,21 @@ PHP_FUNCTION(http_parse_params) { char *param; int param_len; + zval *params; if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", ¶m, ¶m_len)) { RETURN_FALSE; } - object_init(return_value); - if (SUCCESS != http_parse_params(param, HASH_OF(return_value))) { - zval_dtor(return_value); + params = ecalloc(1, sizeof(zval)); + array_init(params); + if (SUCCESS != http_parse_params(param, Z_ARRVAL_P(params))) { + zval_dtor(params); + FREE_ZVAL(params); RETURN_FALSE; } + object_init(return_value); + add_property_zval(return_value, "params", params); } /* }}} */