From: Remi Collet Date: Fri, 5 Jun 2020 15:08:21 +0000 (+0200) Subject: encode param is optional X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eae3bda9e368c94c7ed4a28b394348c9a3ee4bd4;p=php encode param is optional --- diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index da8e37393f..f85464abe1 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -194,9 +194,9 @@ class ZipArchive #ifdef HAVE_METHOD_SUPPORTED /** @return bool */ - public static function isCompressionMethodSupported(int $method, bool $enc): bool {} + public static function isCompressionMethodSupported(int $method, bool $enc = true): bool {} /** @return bool */ - public static function isEncryptionMethodSupported(int $method, bool $enc): bool {} + public static function isEncryptionMethodSupported(int $method, bool $enc = true): bool {} #endif } diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index c1e8f24faf..5f150b9eb2 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -271,9 +271,9 @@ ZEND_END_ARG_INFO() #endif #if defined(HAVE_METHOD_SUPPORTED) -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0) - ZEND_ARG_TYPE_INFO(0, enc, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() #endif