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.
main
SvenRtbg 3 years ago committed by GitHub
parent 8657f80ddd
commit 5c4e1cedb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,8 +51,9 @@ class ZipArchiver implements ArchiverInterface
/**
* 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);
/**

Loading…
Cancel
Save