projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
don't release twice
[m6w6/ext-http]
/
php_http_env.c
diff --git
a/php_http_env.c
b/php_http_env.c
index eef0c37aad541fb1d64ce933d13fd63a3ff2f19c..af0039473eeb02e0e0b96da14857eabee55b3090 100644
(file)
--- a/
php_http_env.c
+++ b/
php_http_env.c
@@
-530,7
+530,7
@@
ZEND_RESULT_CODE php_http_env_set_response_header_value(long http_code, const ch
zval *data_ptr;
HashTable *ht = HASH_OF(value);
zval *data_ptr;
HashTable *ht = HASH_OF(value);
- ZEND_HASH_FOREACH_VAL(ht, data_ptr)
+ ZEND_HASH_FOREACH_VAL
_IND
(ht, data_ptr)
{
if (SUCCESS != php_http_env_set_response_header_value(http_code, name_str, name_len, data_ptr, first)) {
return FAILURE;
{
if (SUCCESS != php_http_env_set_response_header_value(http_code, name_str, name_len, data_ptr, first)) {
return FAILURE;
@@
-957,18
+957,10
@@
static SAPI_POST_HANDLER_FUNC(php_http_json_post_handler)
ZVAL_NULL(&tmp);
php_json_decode(&tmp, json->val, json->len, 1, PG(max_input_nesting_level));
ZVAL_NULL(&tmp);
php_json_decode(&tmp, json->val, json->len, 1, PG(max_input_nesting_level));
- switch (Z_TYPE(tmp)) {
- case IS_NULL:
- break;
-
- case IS_ARRAY:
+ if (Z_TYPE(tmp) == IS_ARRAY) {
array_copy(Z_ARRVAL(tmp), Z_ARRVAL_P(zarg));
array_copy(Z_ARRVAL(tmp), Z_ARRVAL_P(zarg));
- zval_ptr_dtor(&tmp);
- break;
-
- default:
- ZVAL_COPY_VALUE(zarg, &tmp);
}
}
+ zval_ptr_dtor(&tmp);
}
zend_string_release(json);
}
}
zend_string_release(json);
}