1
0
Fork 0

Ensure opening the zip was successful before proceeding

pull/7658/head
Kristof Ringleff, Fooman 2018-09-21 15:51:38 +12:00
parent add71388ca
commit bcf4e94e8a
1 changed files with 5 additions and 1 deletions

View File

@ -126,7 +126,11 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
private function getComposerInformation(\SplFileInfo $file)
{
$zip = new \ZipArchive();
$zip->open($file->getPathname());
$res = $zip->open($file->getPathname());
if ($res !== true) {
return false;
}
if (0 == $zip->numFiles) {
$zip->close();