}
}
+ if (PG(register_globals)) {
+ HashPosition pos;
+ zval **data;
+ char *string_key;
+ uint string_key_len;
+
+ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(form_variables), &pos);
+ while (zend_hash_get_current_data_ex(Z_ARRVAL_P(form_variables), (void **)&data, &pos) == SUCCESS) {
+ zend_hash_get_current_key_ex(Z_ARRVAL_P(form_variables), &string_key, &string_key_len, NULL, 0, &pos);
+
+ ZEND_SET_SYMBOL_WITH_LENGTH(&EG(symbol_table), string_key, string_key_len, *data, (*data)->refcount+1, 0);
+ zend_hash_move_forward_ex(Z_ARRVAL_P(form_variables), &pos);
+ }
+ }
zend_hash_update(&EG(symbol_table), "_REQUEST", sizeof("_REQUEST"), &form_variables, sizeof(zval *), NULL);
}
char *ip; /* index pointer */
char *index;
int var_len, index_len;
- zval *gpc_element, **gpc_element_p, **top_gpc_p=NULL;
+ zval *gpc_element, **gpc_element_p;
zend_bool is_array;
HashTable *symtable1=NULL;
- HashTable *symtable2=NULL;
assert(var != NULL);
if (track_vars_array) {
symtable1 = Z_ARRVAL_P(track_vars_array);
}
- if (PG(register_globals)) {
- if (symtable1) {
- symtable2 = EG(active_symbol_table);
- } else {
- symtable1 = EG(active_symbol_table);
- }
- }
if (!symtable1) {
/* Nothing to do */
zval_dtor(val);
efree(escaped_index);
}
}
- if (!top_gpc_p) {
- top_gpc_p = gpc_element_p;
- }
symtable1 = Z_ARRVAL_PP(gpc_element_p);
/* ip pointed to the '[' character, now obtain the key */
index = index_s;
} else {
zend_hash_update(symtable1, index, index_len+1, &gpc_element, sizeof(zval *), (void **) &gpc_element_p);
}
- if (!top_gpc_p) {
- top_gpc_p = gpc_element_p;
- }
break;
}
}
-
- if (top_gpc_p) {
- if (symtable2) {
- zend_hash_update(symtable2, var, var_len+1, top_gpc_p, sizeof(zval *), NULL);
- (*top_gpc_p)->refcount++;
- }
- }
}