summaryrefslogtreecommitdiffstats
path: root/system/libraries/Zip.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Zip.php')
-rw-r--r--system/libraries/Zip.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 377c38741..518c97836 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -156,7 +156,7 @@ class CI_Zip {
$crc32 = crc32($data);
$gzdata = gzcompress($data);
- $gzdata = substr(substr($gzdata, 0, strlen($gzdata) - 4), 2);
+ $gzdata = substr($gzdata, 2, -4);
$newlen = strlen($gzdata);
$this->zipdata[] = "\x50\x4b\x03\x04\x14\x00\x00\x00\x08\x00\x00\x00\x00\x00"
@@ -166,10 +166,7 @@ class CI_Zip {
.pack('v', strlen($filepath))
.pack('v', 0)
.$filepath
- .$gzdata
- .pack('V', $crc32)
- .pack('V', $newlen)
- .pack('V', $oldlen);
+ .$gzdata;
$newoffset = strlen(implode("", $this->zipdata));