com php-src: Remove spurious return true from DOMXPath::registerPhpFunctions(): ext/dom/php_dom.stub.ph p ext/dom/php_dom_arginfo.h ext/dom/xpath.c
| From: | Nikita Popov | Date: | Fri, 17 Jul 2020 14:11:30 +0000 |
| Subject: | com php-src: Remove spurious return true from DOMXPath::registerPhpFunctions(): ext/dom/php_dom.stub.ph p ext/dom/php_dom_arginfo.h ext/dom/xpath.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112218@lists.php.net to get a copy of this message | ||
Commit: d625c29df7b4bdb1abe2aa0bc987aecfd534fd54
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 17 Jul 2020 16:11:30 +0200
Parents: d449d1dbbf7cefb3d249a629c5c61f6b16015583
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d625c29df7b4bdb1abe2aa0bc987aecfd534fd54
Log:
Remove spurious return true from DOMXPath::registerPhpFunctions()
Only one of three identical cases returned true, and the function
is documented to return void. Remove the outlier.
Changed paths:
M ext/dom/php_dom.stub.php
M ext/dom/php_dom_arginfo.h
M ext/dom/xpath.c
Diff:
diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php
index f84282542d..42628c39a2 100644
--- a/ext/dom/php_dom.stub.php
+++ b/ext/dom/php_dom.stub.php
@@ -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
diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h
index 5724b98b79..c45b319f1c 100644
--- a/ext/dom/php_dom_arginfo.h
+++ b/ext/dom/php_dom_arginfo.h
@@ -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)
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c
index e45ca84d8c...c96f104229 100644
--- a/ext/dom/xpath.c
+++ b/ext/dom/xpath.c
@@ -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);