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
parent
8657f80ddd
commit
5c4e1cedb2
|
@ -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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue