X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_misc.c;h=00b8d8618e920d2c5ddcfa43b7c9eeb6ba0b7052;hb=40a6a12edc42c8b830f7251b4b9eebef62f047fc;hp=ff0c02475d204075ef18547792d50de54cd5ee9e;hpb=03f11ce599fa5a89148d588caf6ccec7f939e9d4;p=m6w6%2Fext-http diff --git a/php_http_misc.c b/php_http_misc.c index ff0c024..00b8d86 100644 --- a/php_http_misc.c +++ b/php_http_misc.c @@ -163,6 +163,7 @@ unsigned php_http_array_list(HashTable *ht, unsigned argc, ...) void php_http_array_copy_strings(zval *zp) { + Z_TRY_ADDREF_P(zp); convert_to_string_ex(zp); } @@ -226,7 +227,7 @@ int php_http_array_apply_merge_func(zval *value, int num_args, va_list args, zen convert_to_string_ex(value); } - Z_ADDREF_P(value); + Z_TRY_ADDREF_P(value); if ((flags & ARRAY_JOIN_PRETTIFY) && hash_key->key) { key = php_http_pretty_key(estrndup(hash_key->key->val, hash_key->key->len), hash_key->key->len, 1, 1);