diff options
author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-10-20 18:43:32 +0000 |
---|---|---|
committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-10-20 18:43:32 +0000 |
commit | f5dd8c00a070aa51184aaa038355884d8a19d3c1 (patch) | |
tree | 654414743dda1b7899a107c5a381892f6f2b9429 /main/rfc1867.c | |
parent | 0f31ed2f7784b873de964e91aab0026c5b9734e2 (diff) | |
download | php-git-f5dd8c00a070aa51184aaa038355884d8a19d3c1.tar.gz |
WS
Diffstat (limited to 'main/rfc1867.c')
-rw-r--r-- | main/rfc1867.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/main/rfc1867.c b/main/rfc1867.c index 4d4c53bb72..828b432c1f 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -1280,28 +1280,28 @@ filedone: s = ""; { - /* store temp_filename as-is (without magic_quotes_gpc-ing it, in case upload_tmp_dir - * contains escapeable characters. escape only the variable name.) */ - zval zfilename; + /* store temp_filename as-is (without magic_quotes_gpc-ing it, in case upload_tmp_dir + * contains escapeable characters. escape only the variable name.) */ + zval zfilename; - /* Initialize variables */ - add_protected_variable(param TSRMLS_CC); + /* Initialize variables */ + add_protected_variable(param TSRMLS_CC); - /* if param is of form xxx[.*] this will cut it to xxx */ - if (!is_anonymous) { + /* if param is of form xxx[.*] this will cut it to xxx */ + if (!is_anonymous) { + ZVAL_STRING(&zfilename, temp_filename, 1); + safe_php_register_variable_ex(param, &zfilename, NULL, 1 TSRMLS_CC); + } + + /* Add $foo[tmp_name] */ + if (is_arr_upload) { + snprintf(lbuf, llen, "%s[tmp_name][%s]", abuf, array_index); + } else { + snprintf(lbuf, llen, "%s[tmp_name]", param); + } + add_protected_variable(lbuf TSRMLS_CC); ZVAL_STRING(&zfilename, temp_filename, 1); - safe_php_register_variable_ex(param, &zfilename, NULL, 1 TSRMLS_CC); - } - - /* Add $foo[tmp_name] */ - if (is_arr_upload) { - snprintf(lbuf, llen, "%s[tmp_name][%s]", abuf, array_index); - } else { - snprintf(lbuf, llen, "%s[tmp_name]", param); - } - add_protected_variable(lbuf TSRMLS_CC); - ZVAL_STRING(&zfilename, temp_filename, 1); - register_http_post_files_variable_ex(lbuf, &zfilename, http_post_files, 1 TSRMLS_CC); + register_http_post_files_variable_ex(lbuf, &zfilename, http_post_files, 1 TSRMLS_CC); } { |