diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-05-17 18:42:35 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-05-17 18:42:35 +0000 |
commit | f4a39b53142d72eb911406bb6654589821968f71 (patch) | |
tree | cae33cfabf77558de18e5b1525d44fbca49a483c | |
parent | 75a3ee02841d625653693cb0c74195cb88193db8 (diff) | |
download | php-git-f4a39b53142d72eb911406bb6654589821968f71.tar.gz |
Fixed bug #32802 (broken MFH)
-rw-r--r-- | main/php_variables.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index cf9d98cc63..f5c8711ae7 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -182,11 +182,25 @@ plain_var: if (!index) { zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); } else { + zval **tmp; + if (PG(magic_quotes_gpc) && (index!=var)) { char *escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC); + + if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && + zend_hash_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) { + efree(escaped_index); + break; + } + zend_hash_update(symtable1, escaped_index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); efree(escaped_index); } else { + if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && + zend_hash_find(symtable1, index, index_len+1, (void **) &tmp) != FAILURE) { + break; + } + zend_hash_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); } } |