diff options
author | Remi Collet <remi@php.net> | 2020-01-27 16:47:28 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2020-01-27 16:47:28 +0100 |
commit | 5215f072af4bd8993488780df45639f12757124d (patch) | |
tree | 6b3831c607fa9061b020a5cf4ea1ec39d521c8a6 /ext/zip/php_zip.c | |
parent | ea1b8788773fe9d5fd517704da332f0725714b8b (diff) | |
download | php-git-5215f072af4bd8993488780df45639f12757124d.tar.gz |
- bump zip extension version to 1.15.6
- add ZipArchive::LIBZIP_VERSION
- skip bug53885.phpt with libzip 1.6.0 (empty file is no more valid archive)
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index b2ac60e9ec..bec14f7f77 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -3147,6 +3147,12 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("EM_AES_256", ZIP_EM_AES_256); #endif +#if HAVE_LIBZIP_VERSION + zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, zip_libzip_version()); +#else + zend_declare_class_constant_string(zip_class_entry, "LIBZIP_VERSION", sizeof("LIBZIP_VERSION")-1, LIBZIP_VERSION); +#endif + php_register_url_stream_wrapper("zip", &php_stream_zip_wrapper); le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number); |