Bug 8130: [SIGNED-OFF] Followup - Empty file upload error never displays.
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 19 Jul 2012 12:41:39 +0000 (08:41 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 23 Jul 2012 16:06:02 +0000 (18:06 +0200)
http://bugs.koha-community.org/show_bug.cgi?id=8130
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
members/files.pl

index ccd11bc..03a7847 100755 (executable)
@@ -73,7 +73,7 @@ else {
             my $filename = $cgi->param('uploadfile');
             my $mimetype = $cgi->uploadInfo($filename)->{'Content-Type'};
 
-            $errors{'empty_upload'} = 1 unless ( length($uploaded_file) > 0 );
+            $errors{'empty_upload'} = 1 if ( -z $uploaded_file );
 
             if (%errors) {
                 $template->param( errors => %errors );