@@ -164,7 +164,7 @@ public function extract($outdir, $strip = '', $exclude = '', $include = '')
164164
165165 // extract data
166166 if (!$ fileinfo ->getIsdir ()) {
167- $ fp = fopen ($ output , "wb " );
167+ $ fp = @ fopen ($ output , "wb " );
168168 if (!$ fp ) {
169169 throw new ArchiveIOException ('Could not open file for writing: ' .$ output );
170170 }
@@ -245,7 +245,7 @@ public function addFile($file, $fileinfo = '')
245245 throw new ArchiveIOException ('Archive has been closed, files can no longer be added ' );
246246 }
247247
248- $ fp = fopen ($ file , 'rb ' );
248+ $ fp = @ fopen ($ file , 'rb ' );
249249 if (!$ fp ) {
250250 throw new ArchiveIOException ('Could not open file for reading: ' .$ file );
251251 }
@@ -379,7 +379,7 @@ public function save($file)
379379 $ this ->setCompression ($ this ->complevel , $ this ->filetype ($ file ));
380380 }
381381
382- if (!file_put_contents ($ file , $ this ->getArchive ())) {
382+ if (!@ file_put_contents ($ file , $ this ->getArchive ())) {
383383 throw new ArchiveIOException ('Could not write to file: ' .$ file );
384384 }
385385 }
@@ -433,7 +433,7 @@ protected function writebytes($data)
433433 *
434434 * @param int $bytes seek to this position
435435 */
436- function skipbytes ($ bytes )
436+ protected function skipbytes ($ bytes )
437437 {
438438 if ($ this ->comptype === Archive::COMPRESS_GZIP ) {
439439 @gzseek ($ this ->fh , $ bytes , SEEK_CUR );
@@ -645,7 +645,7 @@ public function filetype($file)
645645 {
646646 // for existing files, try to read the magic bytes
647647 if (file_exists ($ file ) && is_readable ($ file ) && filesize ($ file ) > 5 ) {
648- $ fh = fopen ($ file , 'rb ' );
648+ $ fh = @ fopen ($ file , 'rb ' );
649649 if (!$ fh ) return false ;
650650 $ magic = fread ($ fh , 5 );
651651 fclose ($ fh );
0 commit comments