diff --git a/src/Composer/Downloader/ZipDownloader.php b/src/Composer/Downloader/ZipDownloader.php index b438ec204..79f636b55 100644 --- a/src/Composer/Downloader/ZipDownloader.php +++ b/src/Composer/Downloader/ZipDownloader.php @@ -54,7 +54,10 @@ class ZipDownloader extends ArchiveDownloader throw new \UnexpectedValueException($this->getErrorMessage($retval, $file)); } - $zipArchive->extractTo($path); + if (true !== $zipArchive->extractTo($path)) { + throw new \RuntimeException("There was an error extracting the ZIP file. Corrupt file?"); + } + $zipArchive->close(); }