Skip to content

Commit 389d113

Browse files
kingkeroremicollet
authored andcommitted
bug: Fix type for $index in ZipArchive::replaceFile
1 parent 6048762 commit 389d113

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/zip/php_zip.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function addFromString(string $name, string $content, int $flags = ZipArc
9191
public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE) {}
9292

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

9696
/** @return array|false */
9797
public function addGlob(string $pattern, int $flags = 0, array $options = []) {}

ext/zip/php_zip_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 095084d2a2df557398191af5dd6c8bea6bb7c338 */
2+
* Stub hash: 5ebaf48b6736126648a981f5bbb25b0bf46dc22a */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -77,7 +77,7 @@ ZEND_END_ARG_INFO()
7777

7878
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ZipArchive_replaceFile, 0, 0, 2)
7979
ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0)
80-
ZEND_ARG_TYPE_INFO(0, index, IS_STRING, 0)
80+
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)
8181
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0")
8282
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0")
8383
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")

0 commit comments

Comments
 (0)