diff --git a/index.php b/index.php index 84cb41e8..429358dc 100644 --- a/index.php +++ b/index.php @@ -751,6 +751,13 @@ public function extractDownload(): void { $this->silentLog('[info] extractDownload()'); $downloadedFilePath = $this->getDownloadedFilePath(); + if (!extension_loaded('zip')) { + throw new \Exception('Required PHP extension missing: zip'); + } + + $libzip_version = defined("ZipArchive::LIBZIP_VERSION") ? \ZipArchive::LIBZIP_VERSION : "Unknown (but old)"; + $this->silentLog('[info] Libzip version detected: ' . $libzip_version); + $zip = new \ZipArchive; $zipState = $zip->open($downloadedFilePath); if ($zipState === true) { diff --git a/lib/Updater.php b/lib/Updater.php index 9ee2d5ce..a7e61722 100644 --- a/lib/Updater.php +++ b/lib/Updater.php @@ -713,6 +713,13 @@ public function extractDownload(): void { $this->silentLog('[info] extractDownload()'); $downloadedFilePath = $this->getDownloadedFilePath(); + if (!extension_loaded('zip')) { + throw new \Exception('Required PHP extension missing: zip'); + } + + $libzip_version = defined("ZipArchive::LIBZIP_VERSION") ? \ZipArchive::LIBZIP_VERSION : "Unknown (but old)"; + $this->silentLog('[info] Libzip version detected: ' . $libzip_version); + $zip = new \ZipArchive; $zipState = $zip->open($downloadedFilePath); if ($zipState === true) { diff --git a/updater.phar b/updater.phar index 50e18c98..919ebdb4 100755 Binary files a/updater.phar and b/updater.phar differ