Skip to content

Commit b1d9a8d

Browse files
committed
Fix return type of stub of xml_parse_into_struct()
Closes GH-12253.
1 parent 84c4336 commit b1d9a8d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ PHP NEWS
3434
foreach). (nielsdos)
3535
. Fixed bug #55098 (SimpleXML iteration produces infinite loop). (nielsdos)
3636

37+
- XML:
38+
. Fix return type of stub of xml_parse_into_struct(). (nielsdos)
39+
3740
28 Sep 2023, PHP 8.1.24
3841

3942
- Core:

ext/xml/xml.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function xml_parse(XMLParser $parser, string $data, bool $is_final = false): int
4444
* @param array $values
4545
* @param array $index
4646
*/
47-
function xml_parse_into_struct(XMLParser $parser, string $data, &$values, &$index = null): int {}
47+
function xml_parse_into_struct(XMLParser $parser, string $data, &$values, &$index = null): int|false {}
4848

4949
function xml_get_error_code(XMLParser $parser): int {}
5050

ext/xml/xml_arginfo.h

+2-2
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: 19ecc0e3b7a82f8b992a311788919154cdb28a5d */
2+
* Stub hash: 7750a602e08f8a64b28ffda0f0537d384fc34f20 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_xml_parser_create, 0, 0, XMLParser, 0)
55
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
@@ -46,7 +46,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parse, 0, 2, IS_LONG, 0)
4646
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_final, _IS_BOOL, 0, "false")
4747
ZEND_END_ARG_INFO()
4848

49-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xml_parse_into_struct, 0, 3, IS_LONG, 0)
49+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xml_parse_into_struct, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
5050
ZEND_ARG_OBJ_INFO(0, parser, XMLParser, 0)
5151
ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
5252
ZEND_ARG_INFO(1, values)

0 commit comments

Comments
 (0)