From: Zeev Suraski Date: Wed, 1 Dec 1999 20:42:56 +0000 (+0000) Subject: @- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts X-Git-Tag: PRE_RETURN_REF_PATCH~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6fd4856922268b69633570f72cb4cbd410ad3d8;p=php @- Make the global GET/POST/Cookie variables and their $HTTP_*_VARS[] counterparts @ be references to each other (Zeev) --- diff --git a/ext/standard/post.c b/ext/standard/post.c index 4f55b21276..e74d85b5ac 100644 --- a/ext/standard/post.c +++ b/ext/standard/post.c @@ -293,10 +293,13 @@ void php_parse_gpc_data2(char *val, char *var, pval *track_vars_array ELS_DC PLS } } - if (symtable2 && top_gpc_p) { - zend_hash_update(symtable2, var, var_len+1, top_gpc_p, sizeof(zval *), NULL); - (*top_gpc_p)->refcount++; - } + if (top_gpc_p) { + (*top_gpc_p)->is_ref = 1; + if (symtable2) { + zend_hash_update(symtable2, var, var_len+1, top_gpc_p, sizeof(zval *), NULL); + (*top_gpc_p)->refcount++; + } + } }