Skip to content

Commit d625c29

Browse files
committed
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.
1 parent d449d1d commit d625c29

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

ext/dom/php_dom.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function query(string $expr, ?DOMNode $context = null, bool $registerNode
425425
/** @return bool */
426426
public function registerNamespace(string $prefix, string $namespaceURI) {}
427427

428-
/** @return bool|null */
428+
/** @return void */
429429
public function registerPhpFunctions(string|array|null $restrict = null) {}
430430
}
431431
#endif

ext/dom/php_dom_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: a9c30985948768261ea275fdbde598cf9119029e */
2+
* Stub hash: a30205758df3a00757ffdfdd0c500b090e022d4f */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 1)
55
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)

ext/dom/xpath.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,6 @@ PHP_METHOD(DOMXPath, registerPhpFunctions)
510510
zend_string_release_ex(str, 0);
511511
} ZEND_HASH_FOREACH_END();
512512
intern->registerPhpFunctions = 2;
513-
RETURN_TRUE;
514513
} else if (name) {
515514
ZVAL_LONG(&new_string, 1);
516515
zend_hash_update(intern->registered_phpfunctions, name, &new_string);

0 commit comments

Comments
 (0)