1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

xml: Switch to safe option setting API (#20128)

This commit is contained in:
Niels Dossche
2025-10-11 10:46:44 +02:00
committed by GitHub
parent 890021e2be
commit a572b1015b

View File

@@ -452,8 +452,12 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m
return NULL;
}
#if LIBXML_VERSION >= 21300
xmlCtxtSetOptions(parser->parser, XML_PARSE_OLDSAX | XML_PARSE_NOENT);
#else
php_libxml_sanitize_parse_ctxt_options(parser->parser);
xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX | XML_PARSE_NOENT);
#endif
parser->parser->wellFormed = 0;
if (sep != NULL) {