Skip to content

Commit 337915f

Browse files
VINADES.,JSChoaquynhtim99
VINADES.,JSC
authored andcommitted
Fix class PclZip
1 parent 54f1134 commit 337915f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vendor/vinades/pclzip/pclzip.lib.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,12 @@ public function privAddFile($p_filedescr, &$p_header, &$p_options)
25922592
}
25932593

25942594
// ----- Read the file content
2595-
$v_content = @fread($v_file, $p_header['size']);
2595+
if ($p_header['size'] <= 0) {
2596+
// File rỗng
2597+
$v_content = '';
2598+
} else {
2599+
$v_content = @fread($v_file, $p_header['size']);
2600+
}
25962601

25972602
// ----- Close the file
25982603
@fclose($v_file);

0 commit comments

Comments
 (0)