1
0
Fork 0

Merge pull request #1010 from baldurrensch/zip_error_check

Added a check for the return code when extracting zip file
pull/1002/merge
Jordi Boggiano 2012-08-18 04:57:59 -07:00
commit 43fa5d5c40
1 changed files with 4 additions and 1 deletions

View File

@ -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();
}