Don't crash if uploading a zero size file https://sourceforge.net/p/webadmin/bugs/5481/

This commit is contained in:
Jamie Cameron
2021-04-30 20:37:10 -07:00
parent 6e01e013a5
commit 4e31a6ae7c

View File

@@ -84,7 +84,7 @@ while(1) {
$last_time = $now;
}
$pc = int(100 * $size / $totalsize) / 2;
$pc = $totalsize ? int(100 * $size / $totalsize) / 2 : 100;
next if (defined($lastpc) && $pc == $lastpc);
print "<script>\n";
print "document.forms[0].file.value = \"".