X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_functions.c;h=f7f73f75afd5b957368ee8951a6df83e96c1f386;hp=1f94df95a317757f252acb79f417cfe69acdced2;hb=8cac80cefc90322b900d568b4e1af97f291cceb3;hpb=51669004bbd20bcb4cd9d509799ff65e3998ea47 diff --git a/http_functions.c b/http_functions.c index 1f94df9..f7f73f7 100644 --- a/http_functions.c +++ b/http_functions.c @@ -733,15 +733,18 @@ PHP_FUNCTION(http_parse_params) RETURN_FALSE; } - params = ecalloc(1, sizeof(zval)); + MAKE_STD_ZVAL(params); array_init(params); if (SUCCESS != http_parse_params(param, flags, Z_ARRVAL_P(params))) { - zval_dtor(params); - FREE_ZVAL(params); + zval_ptr_dtor(¶ms); RETURN_FALSE; } + object_init(return_value); add_property_zval(return_value, "params", params); +#ifdef ZEND_ENGINE_2 + zval_ptr_dtor(¶ms); +#endif } /* }}} */ @@ -853,7 +856,7 @@ PHP_FUNCTION(http_persistent_handles_ident) zval **bodyonly; \ \ /* check if only the body should be returned */ \ - if (options && (SUCCESS == zend_hash_find(Z_ARRVAL_P(options), "bodyonly", sizeof("bodyonly"), (void *) &bodyonly)) && zval_is_true(*bodyonly)) { \ + if (options && (SUCCESS == zend_hash_find(Z_ARRVAL_P(options), "bodyonly", sizeof("bodyonly"), (void *) &bodyonly)) && i_zend_is_true(*bodyonly)) { \ http_message *msg = http_message_parse(PHPSTR_VAL(&request.conv.response), PHPSTR_LEN(&request.conv.response)); \ \ if (msg) { \