Skip to content

Commit eae3bda

Browse files
committed
encode param is optional
1 parent 8d2c7ef commit eae3bda

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/zip/php_zip.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ public function registerCancelCallback(callable $callback) {}
194194

195195
#ifdef HAVE_METHOD_SUPPORTED
196196
/** @return bool */
197-
public static function isCompressionMethodSupported(int $method, bool $enc): bool {}
197+
public static function isCompressionMethodSupported(int $method, bool $enc = true): bool {}
198198

199199
/** @return bool */
200-
public static function isEncryptionMethodSupported(int $method, bool $enc): bool {}
200+
public static function isEncryptionMethodSupported(int $method, bool $enc = true): bool {}
201201
#endif
202202
}

ext/zip/php_zip_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ ZEND_END_ARG_INFO()
271271
#endif
272272

273273
#if defined(HAVE_METHOD_SUPPORTED)
274-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 2, _IS_BOOL, 0)
274+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_isCompressionMethodSupported, 0, 1, _IS_BOOL, 0)
275275
ZEND_ARG_TYPE_INFO(0, method, IS_LONG, 0)
276-
ZEND_ARG_TYPE_INFO(0, enc, _IS_BOOL, 0)
276+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enc, _IS_BOOL, 0, "true")
277277
ZEND_END_ARG_INFO()
278278
#endif
279279

0 commit comments

Comments
 (0)