From 5215f072af4bd8993488780df45639f12757124d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Jan 2020 16:47:28 +0100 Subject: - 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) --- ext/zip/php_zip.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/zip/php_zip.c') 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); -- cgit v1.2.1