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;
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) {