Skip to content

Commit 533af1e

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: ZipArchive methods do not return NULL
2 parents dfb9e03 + e470f9b commit 533af1e

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ext/zip/php_zip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ PHP_METHOD(ZipArchive, setMtimeName)
24492449

24502450
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l",
24512451
&name, &name_len, &mtime, &flags) == FAILURE) {
2452-
return;
2452+
RETURN_THROWS();
24532453
}
24542454

24552455
ZIP_FROM_OBJECT(intern, this);
@@ -2483,7 +2483,7 @@ PHP_METHOD(ZipArchive, setMtimeIndex)
24832483

24842484
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l",
24852485
&index, &mtime, &flags) == FAILURE) {
2486-
return;
2486+
RETURN_THROWS();
24872487
}
24882488

24892489
ZIP_FROM_OBJECT(intern, this);

ext/zip/php_zip.stub.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ public function setArchiveComment(string $comment) {}
111111
/** @return string|false */
112112
public function getArchiveComment(int $flags = 0) {}
113113

114-
/** @return bool|null */
114+
/** @return bool */
115115
public function setCommentIndex(int $index, string $comment) {}
116116

117-
/** @return bool|null */
117+
/** @return bool */
118118
public function setCommentName(string $name, string $comment) {}
119119

120120
#ifdef HAVE_SET_MTIME
121-
/** @return bool|null */
121+
/** @return bool */
122122
public function setMtimeIndex(int $index, int $timestamp, int $flags = 0) {}
123123

124-
/** @return bool|null */
124+
/** @return bool */
125125
public function setMtimeName(string $name, int $timestamp, int $flags = 0) {}
126126
#endif
127127

ext/zip/php_zip_arginfo.h

Lines changed: 1 addition & 1 deletion
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: 4ca2b108e71924309abcdc1a0f86f5963a8516f3 */
2+
* Stub hash: 8994595a1c86072629e051291e87cc5e1774eb7f */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)

0 commit comments

Comments
 (0)