]> granicus.if.org Git - php/commitdiff
ZipArchive methods do not return NULL
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 2 Jan 2021 11:18:46 +0000 (12:18 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sun, 3 Jan 2021 15:12:10 +0000 (16:12 +0100)
Closes GH-6563.

ext/zip/php_zip.c
ext/zip/php_zip.stub.php
ext/zip/php_zip_arginfo.h

index 92272d270fe16150e01dcef5d5dc52339407584b..6875850687383d1afb8a6990e1a1794848997fac 100644 (file)
@@ -2449,7 +2449,7 @@ PHP_METHOD(ZipArchive, setMtimeName)
 
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl|l",
                        &name, &name_len, &mtime,  &flags) == FAILURE) {
-               return;
+               RETURN_THROWS();
        }
 
        ZIP_FROM_OBJECT(intern, this);
@@ -2483,7 +2483,7 @@ PHP_METHOD(ZipArchive, setMtimeIndex)
 
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l",
                        &index, &mtime, &flags) == FAILURE) {
-               return;
+               RETURN_THROWS();
        }
 
        ZIP_FROM_OBJECT(intern, this);
index 9a276a05df10e2aa97372098a4ed19bfe49851f1..ddda62d6b03b93de8a3fc452c83cbcebc499710c 100644 (file)
@@ -111,17 +111,17 @@ class ZipArchive
     /** @return string|false */
     public function getArchiveComment(int $flags = 0) {}
 
-    /** @return bool|null */
+    /** @return bool */
     public function setCommentIndex(int $index, string $comment) {}
 
-    /** @return bool|null */
+    /** @return bool */
     public function setCommentName(string $name, string $comment) {}
 
 #ifdef HAVE_SET_MTIME
-    /** @return bool|null */
+    /** @return bool */
     public function setMtimeIndex(int $index, int $timestamp, int $flags = 0) {}
 
-    /** @return bool|null */
+    /** @return bool */
     public function setMtimeName(string $name, int $timestamp, int $flags = 0) {}
 #endif
 
index a4167fa8ca4bf7323aeaf1bce0ee731c42d3dd14..87212a4975133652da3bb050da48c119c2d62d83 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 4ca2b108e71924309abcdc1a0f86f5963a8516f3 */
+ * Stub hash: 8994595a1c86072629e051291e87cc5e1774eb7f */
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1)
        ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)