1
0
Fork 0

Merge pull request #7658 from fooman/fix-non-zip-file-with-zip-ext

Fix regression for artifact repository
pull/7762/head
Jordi Boggiano 2018-10-31 16:12:55 +01:00 committed by GitHub
commit 9e6a0bff71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB