PHP "divide by zero" error when unzipping 0 byte (very small) .zip files #803

This commit is contained in:
Prasath Mani 2022-06-29 02:14:35 +00:00 committed by GitHub
parent 50ccd29623
commit 17de8af81b

View file

@ -1671,7 +1671,7 @@ if (isset($_GET['view'])) {
Files in archive: <?php echo $total_files ?><br>
Total size: <?php echo fm_get_filesize($total_uncomp) ?><br>
Size in archive: <?php echo fm_get_filesize($total_comp) ?><br>
Compression: <?php echo round(($total_comp / $total_uncomp) * 100) ?>%<br>
Compression: <?php echo round(($total_comp / max($total_uncomp, 1)) * 100) ?>%<br>
<?php
}
// Image info