Added a check for the return code when extracting zip file
parent
7b3ce479cd
commit
1398757963
|
@ -54,7 +54,10 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
throw new \UnexpectedValueException($this->getErrorMessage($retval, $file));
|
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();
|
$zipArchive->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue