Skip to content

Commit

Permalink
bug: Fix type for $index in ZipArchive::replaceFile
Browse files Browse the repository at this point in the history
  • Loading branch information
kingkero authored and remicollet committed May 2, 2022
1 parent 6048762 commit 389d113
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext/zip/php_zip.stub.php
Expand Up @@ -91,7 +91,7 @@ public function addFromString(string $name, string $content, int $flags = ZipArc
public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE) {}

/** @return bool */
public function replaceFile(string $filepath, string $index, int $start = 0, int $length = 0, int $flags = 0) {}
public function replaceFile(string $filepath, int $index, int $start = 0, int $length = 0, int $flags = 0) {}

/** @return array|false */
public function addGlob(string $pattern, int $flags = 0, array $options = []) {}
Expand Down
4 changes: 2 additions & 2 deletions ext/zip/php_zip_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 095084d2a2df557398191af5dd6c8bea6bb7c338 */
* Stub hash: 5ebaf48b6736126648a981f5bbb25b0bf46dc22a */

ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
Expand Down Expand Up @@ -77,7 +77,7 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_replaceFile, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
Expand Down

0 comments on commit 389d113

Please sign in to comment.