Skip to content

Commit 4ef341d

Browse files
committed
Fix parameter type
1 parent 43c3d78 commit 4ef341d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/simplexml/simplexml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2622,7 +2622,7 @@ PHP_FUNCTION(simplexml_import_dom)
26222622
nodep = php_libxml_import_node(node);
26232623

26242624
if (!nodep) {
2625-
zend_argument_type_error(1, "must be of type DOMNode, %s given", zend_zval_type_name(node));
2625+
zend_argument_type_error(1, "must be of type SimpleXMLElement|DOMNode, %s given", zend_zval_type_name(node));
26262626
RETURN_THROWS();
26272627
}
26282628

ext/simplexml/simplexml.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function simplexml_load_file(string $filename, ?string $class_name = SimpleXMLEl
66

77
function simplexml_load_string(string $data, ?string $class_name = SimpleXMLElement::class, int $options = 0, string $namespace_or_prefix = "", bool $is_prefix = false): SimpleXMLElement|false {}
88

9-
function simplexml_import_dom(DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}
9+
function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_name = SimpleXMLElement::class): ?SimpleXMLElement {}
1010

1111
class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
1212
{

ext/simplexml/simplexml_arginfo.h

Lines changed: 2 additions & 2 deletions
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: f8ca25a00ae1a5fed436851e88229b503c77bf31 */
2+
* Stub hash: 70ace711365bb5e7df3174d4cfe68fb3df34a105 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_file, 0, 1, SimpleXMLElement, MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
@@ -18,7 +18,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_string, 0, 1,
1818
ZEND_END_ARG_INFO()
1919

2020
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_simplexml_import_dom, 0, 1, SimpleXMLElement, 1)
21-
ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
21+
ZEND_ARG_OBJ_TYPE_MASK(0, node, SimpleXMLElement|DOMNode, 0, NULL)
2222
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class")
2323
ZEND_END_ARG_INFO()
2424

0 commit comments

Comments
 (0)