summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-04-17 15:06:50 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-04-17 15:06:50 +0000
commit843d0d58a080c009fdc97fcb1a82c943e4907166 (patch)
tree6cab5d87f992c30af24ced149fdd3a6b3b77e5b1 /main/php_variables.c
parent170af7e86174f13ed3142a7d2b0758ab6254ff37 (diff)
downloadphp-git-843d0d58a080c009fdc97fcb1a82c943e4907166.tar.gz
Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys).
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 0d8061622c..0de1bd6574 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -158,8 +158,7 @@ PHPAPI void php_register_variable_ex(char *var, zval *val, zval *track_vars_arra
array_init(gpc_element);
zend_hash_next_index_insert(symtable1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
} else {
- if (PG(magic_quotes_gpc) && (index != var)) {
- /* no need to addslashes() the index if it's the main variable name */
+ if (PG(magic_quotes_gpc)) {
escaped_index = php_addslashes(index, index_len, &index_len, 0 TSRMLS_CC);
} else {
escaped_index = index;