File tree 3 files changed +4
-22
lines changed
3 files changed +4
-22
lines changed Original file line number Diff line number Diff line change
1
+ Rev. 2.0.8 - 2015-11-16
2
+ * Updated Dependencies.
3
+ * Added buffer flush monitoring to ZipStream following error #38
4
+ ---------------------------------------------------------------------
1
5
Rev. 2.0.7 - 2015-04-30
2
6
* Updated Dependencies.
3
7
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ class ZipStream extends AbstractZipArchive {
16
16
17
17
const STREAM_CHUNK_SIZE = 16384 ; // 16 KB
18
18
private $ maxStreamBufferLength = 1048576 ;
19
- private $ log = "" ;
20
19
21
20
/**
22
21
* Constructor.
@@ -150,14 +149,11 @@ public function onProcessFile(array $params){
150
149
*/
151
150
public function zipVerifyMemBuffer ($ gzLength ) {
152
151
if (ob_get_length () !== FALSE && ob_get_length () > $ this ->maxStreamBufferLength ) {
153
- $ this ->log ("zipVerifyMemBuffer... " . ob_get_length ());
154
152
155
153
ob_flush ();
156
154
157
155
while (ob_get_length () > $ this ->maxStreamBufferLength ) {
158
- $ this ->log ("buffer exceeded, waiting... " . ob_get_length ());
159
156
usleep (500000 );
160
- $ this ->log ("buffer exceeded, resuming... " . ob_get_length ());
161
157
}
162
158
}
163
159
}
@@ -205,20 +201,4 @@ public function getMaxStreamBufferLength() {
205
201
public function setMaxStreamBufferLength ($ maxStreamBufferLength ) {
206
202
$ this ->maxStreamBufferLength = $ maxStreamBufferLength ;
207
203
}
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
- }
224
204
}
Original file line number Diff line number Diff line change @@ -168,8 +168,6 @@ public function test3(){
168
168
$ zip ->addDirectory ("images " );
169
169
$ zip ->addDirectoryContent ("../../testData/images/1 " ,"images " );
170
170
171
- $ zip ->addFile ($ zip ->getLog (), "log.txt " );
172
-
173
171
$ zip ->finalize ();
174
172
175
173
if (ob_get_length () > 0 ) {
You can’t perform that action at this time.
0 commit comments