Skip to content

Commit

Permalink
Merge pull request tschoffelen#120 from DanBrada/overwrite_tempfile
Browse files Browse the repository at this point in the history
Change method of opening ZIP files
  • Loading branch information
tschoffelen authored Oct 25, 2022
2 parents 002f900 + 81d3561 commit ee8c9de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PKPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ protected function createZip($manifest, $signature)
// Package file in Zip (as .pkpass)
$zip = new ZipArchive();
$filename = tempnam($this->tempPath, 'pkpass');
if (!$zip->open($filename, ZipArchive::CREATE)) {
if (!$zip->open($filename, ZipArchive::OVERWRITE)) {
throw new PKPassException('Could not open ' . basename($filename) . ' with ZipArchive extension.');
}
$zip->addFromString('signature', $signature);
Expand Down

0 comments on commit ee8c9de

Please sign in to comment.