From: Xinchen Hui Date: Mon, 12 May 2014 03:39:55 +0000 (+0800) Subject: Fixed reference handling X-Git-Tag: POST_PHPNG_MERGE~383^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b2b508a2796da04e6a07441d3a62f0cf24340abc;p=php Fixed reference handling --- diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 18fd70b8c7..f383603803 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -680,6 +680,7 @@ static void php_wddx_add_var(wddx_packet *packet, zval *name_var) target_hash->u.v.nApplyCount++; } + ZVAL_DEREF(val); php_wddx_add_var(packet, val); if (is_array) { @@ -906,6 +907,7 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name) zend_bool incomplete_class = 0; zend_str_tolower(Z_STRVAL(ent1->data), Z_STRLEN(ent1->data)); + STR_FORGET_HASH_VAL(Z_STR(ent1->data)); if ((pce = zend_hash_find(EG(class_table), Z_STR(ent1->data))) == NULL) { incomplete_class = 1; pce = PHP_IC_ENTRY; @@ -1101,14 +1103,21 @@ PHP_FUNCTION(wddx_serialize_vars) php_wddx_add_chunk_static(packet, WDDX_STRUCT_S); for (i=0; is)); php_wddx_destructor(packet); @@ -1204,10 +1213,16 @@ PHP_FUNCTION(wddx_add_vars) } for (i=0; i