Skip to content

Commit

Permalink
Merge pull request #638 from spotweb/Using-empty-file-as-ZipArchive-i…
Browse files Browse the repository at this point in the history
…s-deprecated

Update Services_NzbHandler_abs.php
  • Loading branch information
mesa57 committed Dec 30, 2020
2 parents 81200b9 + a8307a7 commit 1d975c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/NzbHandler/Services_NzbHandler_abs.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ protected function zipNzbList($nzbList)
$tmpZip = tempnam(sys_get_temp_dir(), 'SpotWebZip');

$zip = new ZipArchive();
$res = $zip->open($tmpZip, ZipArchive::CREATE);
$res = $zip->open($tmpZip, ZipArchive::OVERWRITE); /* truncate as empty file is not valid */
if ($res !== true) {
throw new Exception('Unable to create temporary ZIP file: '.$res);
} // if
Expand Down

0 comments on commit 1d975c2

Please sign in to comment.