Fix a zip error

Fix Fatal error:  Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0 in /app/kod/archiveLib/pclzip.class.php:2704
pull/519/head
bbbboom 2023-04-07 08:58:13 +08:00 committed by GitHub
parent 3443d9e5dd
commit 38e5b3cfef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2700,7 +2700,10 @@
} }
// ----- Read the file content // ----- 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 // ----- Close the file
@fclose($v_file); @fclose($v_file);