projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix bug #14218 Class' extending HttpMessage properties not accessible
[m6w6/ext-http]
/
http_functions.c
diff --git
a/http_functions.c
b/http_functions.c
index 1f94df95a317757f252acb79f417cfe69acdced2..7b58cf7fb502696965b65a322a2fa9d77816641f 100644
(file)
--- a/
http_functions.c
+++ b/
http_functions.c
@@
-256,7
+256,7
@@
PHP_FUNCTION(http_negotiate_content_type)
Send HTTP status code. */
PHP_FUNCTION(http_send_status)
{
Send HTTP status code. */
PHP_FUNCTION(http_send_status)
{
-
int
status = 0;
+
long
status = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &status) != SUCCESS) {
RETURN_FALSE;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &status) != SUCCESS) {
RETURN_FALSE;
@@
-733,15
+733,18
@@
PHP_FUNCTION(http_parse_params)
RETURN_FALSE;
}
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))) {
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;
}
RETURN_FALSE;
}
+
object_init(return_value);
add_property_zval(return_value, "params", params);
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 */ \
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) { \
http_message *msg = http_message_parse(PHPSTR_VAL(&request.conv.response), PHPSTR_LEN(&request.conv.response)); \
\
if (msg) { \