Skip to content

Commit 936f93d

Browse files
committed
2.0.8 release
1 parent 3be5ec9 commit 936f93d

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

REVISION.TXT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Rev. 2.0.8 - 2015-11-16
2+
* Updated Dependencies.
3+
* Added buffer flush monitoring to ZipStream following error #38
4+
---------------------------------------------------------------------
15
Rev. 2.0.7 - 2015-04-30
26
* Updated Dependencies.
37

src/Zip/Stream/ZipStream.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class ZipStream extends AbstractZipArchive {
1616

1717
const STREAM_CHUNK_SIZE = 16384; // 16 KB
1818
private $maxStreamBufferLength = 1048576;
19-
private $log = "";
2019

2120
/**
2221
* Constructor.
@@ -150,14 +149,11 @@ public function onProcessFile(array $params){
150149
*/
151150
public function zipVerifyMemBuffer($gzLength) {
152151
if (ob_get_length() !== FALSE && ob_get_length() > $this->maxStreamBufferLength) {
153-
$this->log("zipVerifyMemBuffer..." . ob_get_length());
154152

155153
ob_flush();
156154

157155
while (ob_get_length() > $this->maxStreamBufferLength) {
158-
$this->log("buffer exceeded, waiting..." . ob_get_length());
159156
usleep(500000);
160-
$this->log("buffer exceeded, resuming..." . ob_get_length());
161157
}
162158
}
163159
}
@@ -205,20 +201,4 @@ public function getMaxStreamBufferLength() {
205201
public function setMaxStreamBufferLength($maxStreamBufferLength) {
206202
$this->maxStreamBufferLength = $maxStreamBufferLength;
207203
}
208-
209-
/**
210-
* @return string
211-
*/
212-
public function getLog() {
213-
return $this->log;
214-
}
215-
216-
/**
217-
* @param string $line
218-
*
219-
* @return string
220-
*/
221-
public function log($line) {
222-
$this->log .= $line . "\n";
223-
}
224204
}

tests/unit/ZipArchiveStreamTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ public function test3(){
168168
$zip->addDirectory("images");
169169
$zip->addDirectoryContent("../../testData/images/1","images");
170170

171-
$zip->addFile($zip->getLog(), "log.txt");
172-
173171
$zip->finalize();
174172

175173
if (ob_get_length() > 0) {

0 commit comments

Comments
 (0)