Skip to content

Commit

Permalink
Class ZipArchive does not have a constructor (#902)
Browse files Browse the repository at this point in the history
Class ZipArchive does not have a constructor and must be instantiated without any parameters.

props. @phpstan
  • Loading branch information
szepeviktor authored May 22, 2020
1 parent acf68a2 commit 19c09d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Task/Archive/Pack.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ protected function archiveZip($archiveFile, $items)
return Result::errorMissingExtension($this, 'zlib', 'zip packing');
}

$zip = new \ZipArchive($archiveFile, \ZipArchive::CREATE);
$zip = new \ZipArchive();
if (!$zip->open($archiveFile, \ZipArchive::CREATE)) {
return Result::error($this, "Could not create zip archive {$archiveFile}");
}
Expand Down

0 comments on commit 19c09d1

Please sign in to comment.