]> granicus.if.org Git - php/commitdiff
Remove spurious return true from DOMXPath::registerPhpFunctions()
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 17 Jul 2020 14:11:30 +0000 (16:11 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 17 Jul 2020 14:11:30 +0000 (16:11 +0200)
Only one of three identical cases returned true, and the function
is documented to return void. Remove the outlier.

ext/dom/php_dom.stub.php
ext/dom/php_dom_arginfo.h
ext/dom/xpath.c

index f84282542dfa27ed1a173c8309d6ff4d2eeabc03..42628c39a28ff0bc2a616e99671f02c0cfc0ab7a 100644 (file)
@@ -425,7 +425,7 @@ class DOMXPath
     /** @return bool */
     public function registerNamespace(string $prefix, string $namespaceURI) {}
 
-    /** @return bool|null */
+    /** @return void */
     public function registerPhpFunctions(string|array|null $restrict = null) {}
 }
 #endif
index 5724b98b79b01cca7381e6c4d375f5938f832943..c45b319f1c6b09cec58e234424b95b209b3e505e 100644 (file)
@@ -1,5 +1,5 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: a9c30985948768261ea275fdbde598cf9119029e */
+ * Stub hash: a30205758df3a00757ffdfdd0c500b090e022d4f */
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1)
        ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
index e45ca84d8c08742a23b404653e078631659278d2..c96f10422943c2a5129d1a06e4aa6683bd260197 100644 (file)
@@ -510,7 +510,6 @@ PHP_METHOD(DOMXPath, registerPhpFunctions)
                        zend_string_release_ex(str, 0);
                } ZEND_HASH_FOREACH_END();
                intern->registerPhpFunctions = 2;
-               RETURN_TRUE;
        } else if (name) {
                ZVAL_LONG(&new_string, 1);
                zend_hash_update(intern->registered_phpfunctions, name, &new_string);