summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-10-15 12:26:54 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-10-15 12:26:54 +0000
commitef1731590af9bd85393cfd52612e3a4d92986aa2 (patch)
treecc8014f68fffd3fe805108ef989539151222e67b
parent31729738c78877069a4caba1450bb979256c8ff4 (diff)
downloadphp-git-ef1731590af9bd85393cfd52612e3a4d92986aa2.tar.gz
Fixed bug #49855 (import_request_variables() always returns NULL).
-rw-r--r--NEWS2
-rw-r--r--ext/standard/basic_functions.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index ae5b1d93ab..fb04df74fa 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,8 @@ PHP NEWS
- Fixed crash when instantiating PDORow and PDOStatement through Reflection.
(Felipe)
+- Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
+ sjoerd at php dot net)
- Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given
output lines >4095 bytes). (Ilia)
- Fixed bug #49809 (time_sleep_until() is not available on OpenSolaris). (Jani)
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 37546a3037..ab46e4b069 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -6048,6 +6048,7 @@ PHP_FUNCTION(import_request_variables)
int types_len;
zval *prefix = NULL;
char *p;
+ zend_bool ok = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &types, &types_len, &prefix) == FAILURE) {
return;
@@ -6070,17 +6071,20 @@ PHP_FUNCTION(import_request_variables)
case 'g':
case 'G':
zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
+ ok = 1;
break;
case 'p':
case 'P':
zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_FILES]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
+ ok = 1;
break;
case 'c':
case 'C':
zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) TSRMLS_CC, (apply_func_args_t) copy_request_variable, 1, prefix);
+ ok = 1;
break;
}
}
@@ -6088,6 +6092,7 @@ PHP_FUNCTION(import_request_variables)
if (ZEND_NUM_ARGS() < 2) {
zval_ptr_dtor(&prefix);
}
+ RETURN_BOOL(ok);
}
/* }}} */