summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-05-17 18:42:35 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-05-17 18:42:35 +0000
commitf4a39b53142d72eb911406bb6654589821968f71 (patch)
treecae33cfabf77558de18e5b1525d44fbca49a483c
parent75a3ee02841d625653693cb0c74195cb88193db8 (diff)
downloadphp-git-f4a39b53142d72eb911406bb6654589821968f71.tar.gz
Fixed bug #32802 (broken MFH)
-rw-r--r--main/php_variables.c14
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);
}
}