@@ -221,9 +221,10 @@ public function currentEntry() {
221221 $ this ->skip = $ header ['compressed ' ] + 16 ;
222222 }
223223
224+ $ stream = new ZipFileInputStream ($ this , $ this ->position , $ header ['compressed ' ]);
225+
224226 // AES vs. traditional PKZIP cipher
225227 if (99 === $ header ['compression ' ]) {
226- $ stream = new ZipFileInputStream ($ this , $ this ->position , $ header ['compressed ' ]);
227228 $ aes = unpack ('vheader/vsize/vversion/a2vendor/cstrength/vcompression ' , $ extra );
228229 $ header ['compression ' ]= $ aes ['compression ' ];
229230 $ is = function () use ($ header , $ stream , $ aes ) {
@@ -253,7 +254,6 @@ public function currentEntry() {
253254 );
254255 };
255256 } else if ($ header ['flags ' ] & 1 ) {
256- $ stream = new ZipFileInputStream ($ this , $ this ->position , $ header ['compressed ' ]);
257257 $ is = function () use ($ header , $ stream ) {
258258 if (null === $ this ->password ) {
259259 throw new IllegalAccessException ('No password set ' );
@@ -270,7 +270,6 @@ public function currentEntry() {
270270 return new DecipheringInputStream ($ stream , $ cipher );
271271 };
272272 } else {
273- $ stream = new ZipFileInputStream ($ this , $ this ->position , $ header ['compressed ' ]);
274273 $ is = function () use ($ stream ) { return $ stream ; };
275274 }
276275
0 commit comments