]> granicus.if.org Git - php/commitdiff
Fixed bug #49855 (import_request_variables() always returns NULL).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 15 Oct 2009 12:26:54 +0000 (12:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 15 Oct 2009 12:26:54 +0000 (12:26 +0000)
NEWS
ext/standard/basic_functions.c

diff --git a/NEWS b/NEWS
index 02b0a0470f152076afc590e9a480f13a0ecf851b..eb0fe5b0b9b7cca250403d030dd0edfcd177b13c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,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)
index 0e4eb0b6afbc0f76b88bb84582f9d724faa6b598..8f89dc022b96bef84d79c60c087359b37161c910 100644 (file)
@@ -6392,6 +6392,7 @@ PHP_FUNCTION(import_request_variables)
        char *types, *prefix;
        uint prefix_len;
        char *p;
+       zend_bool ok = 0;
 
        switch (ZEND_NUM_ARGS()) {
 
@@ -6429,20 +6430,24 @@ PHP_FUNCTION(import_request_variables)
                        case 'g':
                        case 'G':
                                zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_GET]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len);
+                               ok = 1;
                                break;
        
                        case 'p':
                        case 'P':
                                zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_POST]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len);
                                zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_FILES]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len);
+                               ok = 1;
                                break;
 
                        case 'c':
                        case 'C':
                                zend_hash_apply_with_arguments(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]), (apply_func_args_t) copy_request_variable, 2, prefix, prefix_len);
+                               ok = 1;
                                break;
                }
        }
+       RETURN_BOOL(ok);
 }
 /* }}} */