summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--main/main.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index ef3ea04c77..071750b06c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
PHP 4.0 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, Version 4.0.7-dev
-- Introduced a new $_FORM variable, which includes any GET, POST or COOKIE
+- Introduced a new $_REQUEST array, which includes any GET, POST or COOKIE
variables. Like the other new variables, this variable is also available
regardless of the context. (Andi & Zeev)
- Introduced $_GET, $_POST, $_COOKIE, $_SERVER and $_ENV variables, which
diff --git a/main/main.c b/main/main.c
index bd835ecb94..0904037ba1 100644
--- a/main/main.c
+++ b/main/main.c
@@ -894,7 +894,7 @@ int php_module_startup(sapi_module_struct *sf)
for (i=0; i<6; i++) {
zend_register_auto_global(short_track_vars_names[i], short_track_vars_names_length[i]-1 TSRMLS_CC);
}
- zend_register_auto_global("_FORM", sizeof("_FORM")-1 TSRMLS_CC);
+ zend_register_auto_global("_REQUEST", sizeof("_REQUEST")-1 TSRMLS_CC);
zend_set_utility_values(&zuv);
php_startup_sapi_content_types();
@@ -1146,20 +1146,21 @@ static int php_hash_environment(TSRMLS_D)
switch (*p) {
case 'g':
case 'G':
- zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 0);
+ zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 1);
+ zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_FILES]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 1);
break;
case 'p':
case 'P':
- zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 0);
+ zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 1);
break;
case 'c':
case 'C':
- zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 0);
+ zend_hash_merge(Z_ARRVAL_P(form_variables), Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]), (void (*)(void *pData)) zval_add_ref, NULL, sizeof(zval *), 1);
break;
}
}
- zend_hash_update(&EG(symbol_table), "_FORM", sizeof("_FORM"), &form_variables, sizeof(zval *), NULL);
+ zend_hash_update(&EG(symbol_table), "_REQUEST", sizeof("_REQUEST"), &form_variables, sizeof(zval *), NULL);
}
return SUCCESS;