Skip to content

Commit

Permalink
Fix a zip error
Browse files Browse the repository at this point in the history
Fix Fatal error:  Uncaught ValueError: fread(): Argument kalcaddle#2 ($length) must be greater than 0 in /app/kod/archiveLib/pclzip.class.php:2704
  • Loading branch information
bbbboom committed Apr 7, 2023
1 parent 3443d9e commit 38e5b3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/kod/archiveLib/pclzip.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2700,7 +2700,10 @@ function privAddFile($p_filedescr, &$p_header, &$p_options)
}

// ----- Read the file content
$v_content = @fread($v_file, $p_header['size']);
$v_content = '';
if ($p_header['size'] > 0) {
$v_content = @fread($v_file, $p_header['size']);
}

// ----- Close the file
@fclose($v_file);
Expand Down

0 comments on commit 38e5b3c

Please sign in to comment.