1
0
Fork 0

Add ability check for ZipArchive (#10092)

ZipArchive::setExternalAttributesName() is only available when libzip 0.11.2 or higher is present. 
This is not the case with at least SUSE SLES 12, so a simple PHP version check will not work here.
pull/10115/head
SvenRtbg 2021-09-13 22:30:02 +02:00 committed by GitHub
parent 8657f80ddd
commit 5c4e1cedb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -51,8 +51,9 @@ class ZipArchiver implements ArchiverInterface
/** /**
* ZipArchive::setExternalAttributesName is available from >= PHP 5.6 * ZipArchive::setExternalAttributesName is available from >= PHP 5.6
* setExternalAttributesName() is only available with libzip 0.11.2 or above
*/ */
if (PHP_VERSION_ID >= 50600) { if (PHP_VERSION_ID >= 50600 && method_exists($zip, 'setExternalAttributesName')) {
$perms = fileperms($filepath); $perms = fileperms($filepath);
/** /**