]> granicus.if.org Git - php/commitdiff
In case of submitting form without any files selected don't set
authorfoobar <sniper@php.net>
Thu, 15 Nov 2001 15:37:02 +0000 (15:37 +0000)
committerfoobar <sniper@php.net>
Thu, 15 Nov 2001 15:37:02 +0000 (15:37 +0000)
the tmp_name.

main/rfc1867.c

index 112af53bbd668aafae3b82a6047aaffa4abc384b..c3cca37034041ced65315e283570e07b7a618523 100644 (file)
@@ -706,12 +706,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
                        } 
                        fclose(fp);
                        
-                       if(cancel_upload) {
-
-                               if(cancel_upload == 1) {
-                                       if (filename) efree(filename);
-                                       SAFE_RETURN;
-                               }
+                       if(cancel_upload || total_bytes == 0) {
 
                                if(temp_filename) {
                                        unlink(temp_filename);