File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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+ ---------------------------------------------------------------------
15Rev. 2.0.7 - 2015-04-30
26* Updated Dependencies.
37
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments