]> granicus.if.org Git - php/commitdiff
- Merge: - #49855 ^# ^author ^date ^msg ^merge^
authorPierre Joye <pajoye@php.net>
Thu, 15 Oct 2009 14:10:03 +0000 (14:10 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 15 Oct 2009 14:10:03 +0000 (14:10 +0000)
ext/standard/basic_functions.c

index 37546a3037ed1b78b9a922f38eec0b2003da1fe8..ab46e4b069d0f5785990871df08d7708db8a532e 100644 (file)
@@ -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);
 }
 /* }}} */