]> granicus.if.org Git - php/commitdiff
encode param is optional
authorRemi Collet <remi@remirepo.net>
Fri, 5 Jun 2020 15:08:21 +0000 (17:08 +0200)
committerRemi Collet <remi@php.net>
Fri, 5 Jun 2020 15:10:12 +0000 (17:10 +0200)
ext/zip/php_zip.stub.php
ext/zip/php_zip_arginfo.h

index da8e37393fc63ea9d74b7bf97da7243601a507cc..f85464abe167f372c0c131c132ec07fdb5e79946 100644 (file)
@@ -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
 }
index c1e8f24fafefd5f3b2cee76ea2281d52becbbe5b..5f150b9eb2975e7513da5215770b1fb6af056089 100644 (file)
@@ -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