From: foobar Date: Sat, 30 Mar 2002 02:58:19 +0000 (+0000) Subject: Fixed a bug with file_uploads=off -> normal post variables not set. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~960 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f43ca8d2bcc63fe34e950c193fea0fdaefdc1758;p=php Fixed a bug with file_uploads=off -> normal post variables not set. --- diff --git a/main/rfc1867.c b/main/rfc1867.c index 97f7399598..780e25c379 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -591,12 +591,6 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) FILE *fp; zend_llist header; - - if (!PG(file_uploads)) { - sapi_module.sapi_error(E_WARNING, "File uploads are disabled"); - return; - } - if (SG(request_info).content_length > SG(post_max_size)) { sapi_module.sapi_error(E_WARNING, "POST Content-Length of %d bytes exceeds the limit of %d bytes", SG(request_info).content_length, SG(post_max_size)); return; @@ -707,6 +701,13 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) continue; } + /* If file_uploads=off, skip the file part */ + if (!PG(file_uploads)) { + efree(filename); + efree(param); + continue; + } + /* Handle file */ fp = php_open_temporary_file(PG(upload_tmp_dir), "php", &temp_filename TSRMLS_CC); if (!fp) {