]> granicus.if.org Git - php/commitdiff
Fixed bug #41093 (magic_quotes_gpc ignores first arrays keys).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 17 Apr 2007 15:06:50 +0000 (15:06 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 17 Apr 2007 15:06:50 +0000 (15:06 +0000)
main/php_variables.c

index 0d8061622c4b589134e1fdab4c816a5ce3ebee1f..0de1bd6574a3fe50fbc6956de384e36c4e6eea7f 100644 (file)
@@ -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;