1
0
Fork 0

Merge pull request #2483 from JakubOnderka/patch-2

Check exception code only if class ZipArchive exists
pull/2488/head
Jordi Boggiano 2013-12-06 04:27:25 -08:00
commit 45c8d5c817
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ abstract class ArchiveDownloader extends FileDownloader
$this->filesystem->removeDirectory($temporaryDir);
// retry downloading if we have an invalid zip file
if ($retries && $e instanceof \UnexpectedValueException && $e->getCode() === \ZipArchive::ER_NOZIP) {
if ($retries && $e instanceof \UnexpectedValueException && class_exists('ZipArchive') && $e->getCode() === \ZipArchive::ER_NOZIP) {
$this->io->write(' Invalid zip file, retrying...');
usleep(500000);
continue;