diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2005-08-10 23:35:51 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2005-08-10 23:35:51 +0000 |
commit | c95107492d20357503d8121a4dc347f53dea6556 (patch) | |
tree | 2ed89599c45c1bfe442bbe35941726d795e9297f /main/php_variables.c | |
parent | 46ef5b170886325e9c0c85e2277386a23c7759eb (diff) | |
download | php-git-c95107492d20357503d8121a4dc347f53dea6556.tar.gz |
MFB minor consistency cleanup
Diffstat (limited to 'main/php_variables.c')
-rw-r--r-- | main/php_variables.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/main/php_variables.c b/main/php_variables.c index 765934fb34..507f0526ba 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -61,7 +61,7 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_arra { char *p = NULL; char *ip; /* index pointer */ - char *index; + char *index, *escaped_index = NULL; int var_len, index_len; zval *gpc_element, **gpc_element_p; zend_bool is_array; @@ -114,7 +114,7 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_arra while (1) { if (is_array) { - char *escaped_index = NULL, *index_s; + char *index_s; int new_idx_len = 0; ip++; @@ -183,7 +183,6 @@ plain_var: zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); } else { zval **tmp; - char *escaped_index; if (PG(magic_quotes_gpc)) { escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC); @@ -198,13 +197,13 @@ plain_var: */ if (PG(http_globals)[TRACK_VARS_COOKIE] && symtable1 == Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) && zend_symtable_find(symtable1, escaped_index, index_len+1, (void **) &tmp) != FAILURE) { - if (PG(magic_quotes_gpc)) { + if (index != escaped_index) { efree(escaped_index); } break; } zend_symtable_update(symtable1, escaped_index, index_len + 1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p); - if (PG(magic_quotes_gpc)) { + if (index != escaped_index) { efree(escaped_index); } } |