lbarnaud Mon Oct 20 18:43:32 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/main rfc1867.c Log: WS http://cvs.php.net/viewvc.cgi/php-src/main/rfc1867.c?r1=1.173.2.1.2.9.2.7&r2=1.173.2.1.2.9.2.8&diff_format=u Index: php-src/main/rfc1867.c diff -u php-src/main/rfc1867.c:1.173.2.1.2.9.2.7 php-src/main/rfc1867.c:1.173.2.1.2.9.2.8 --- php-src/main/rfc1867.c:1.173.2.1.2.9.2.7 Mon Oct 20 18:42:58 2008 +++ php-src/main/rfc1867.c Mon Oct 20 18:43:32 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: rfc1867.c,v 1.173.2.1.2.9.2.7 2008/10/20 18:42:58 lbarnaud Exp $ */ +/* $Id: rfc1867.c,v 1.173.2.1.2.9.2.8 2008/10/20 18:43:32 lbarnaud Exp $ */ /* * This product includes software developed by the Apache Group @@ -1280,28 +1280,28 @@ 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); } {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php