Explorar el Código

addendum to #7428

Rob Bast hace 7 años
padre
commit
0db48b4f2e
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/Composer/Repository/ArtifactRepository.php

+ 4 - 0
src/Composer/Repository/ArtifactRepository.php

@@ -129,11 +129,15 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito
         $zip->open($file->getPathname());
 
         if (0 == $zip->numFiles) {
+            $zip->close();
+
             return false;
         }
 
         $foundFileIndex = $this->locateFile($zip, 'composer.json');
         if (false === $foundFileIndex) {
+            $zip->close();
+
             return false;
         }