php-src
php-src copied to clipboard
Zip::extractTo return false on actual zip file
Description
The following code:
<?php
$zip = new \ZipArchive();
$zip->open('subtitle.zip');
$zip->extractTo('.'); // false
The following file is real zip archive because the open method return true, But the extractTo for some reason return false.
Is is possible to find the cause ?
PHP Version
PHP 8.0.0
Operating System
Windows 10
Checking $zip->status partially reveals what's going on. It is ZipArchive::ER_COMPNOTSUPP, because the archive entries are compressed with PPMd, and that compression method is not supported by libzip. Consider to file a respective feature request upstream.