iliaa Thu, 15 Oct 2009 12:26:54 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=289666
Log: Fixed bug #49855 (import_request_variables() always returns NULL). Bug: http://bugs.php.net/49855 (Verified) import_request_variables always return false in any codition. Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/standard/basic_functions.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c U php/php-src/trunk/ext/standard/basic_functions.c Modified: php/php-src/branches/PHP_5_2/NEWS =================================================================== --- php/php-src/branches/PHP_5_2/NEWS 2009-10-15 11:04:57 UTC (rev 289665) +++ php/php-src/branches/PHP_5_2/NEWS 2009-10-15 12:26:54 UTC (rev 289666) @@ -11,6 +11,8 @@ - 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) Modified: php/php-src/branches/PHP_5_2/ext/standard/basic_functions.c =================================================================== --- php/php-src/branches/PHP_5_2/ext/standard/basic_functions.c 2009-10-15 11:04:57 UTC (rev 289665) +++ php/php-src/branches/PHP_5_2/ext/standard/basic_functions.c 2009-10-15 12:26:54 UTC (rev 289666) @@ -6392,6 +6392,7 @@ char *types, *prefix; uint prefix_len; char *p; + zend_bool ok = 0; switch (ZEND_NUM_ARGS()) { @@ -6429,20 +6430,24 @@ 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); } /* }}} */ Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2009-10-15 11:04:57 UTC (rev 289665) +++ php/php-src/branches/PHP_5_3/NEWS 2009-10-15 12:26:54 UTC (rev 289666) @@ -19,6 +19,8 @@ - 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) Modified: php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2009-10-15 11:04:57 UTC (rev 289665) +++ php/php-src/branches/PHP_5_3/ext/standard/basic_functions.c 2009-10-15 12:26:54 UTC (rev 289666) @@ -6048,6 +6048,7 @@ 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 @@ 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 @@ if (ZEND_NUM_ARGS() < 2) { zval_ptr_dtor(&prefix); } + RETURN_BOOL(ok); } /* }}} */ Modified: php/php-src/trunk/ext/standard/basic_functions.c =================================================================== --- php/php-src/trunk/ext/standard/basic_functions.c 2009-10-15 11:04:57 UTC (rev 289665) +++ php/php-src/trunk/ext/standard/basic_functions.c 2009-10-15 12:26:54 UTC (rev 289666) @@ -6167,6 +6167,7 @@ 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, UG(ascii_conv), &prefix) == FAILURE) { return; @@ -6189,17 +6190,20 @@ 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; } } @@ -6207,6 +6211,7 @@ if (ZEND_NUM_ARGS() < 2) { zval_ptr_dtor(&prefix); } + RETURN_BOOL(ok); } /* }}} */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php