mirror of
https://github.com/php/php-src.git
synced 2026-04-23 16:08:35 +02:00
Allow libxml to detect the document encoding if encoding parameter passed to
XML_ParserCreate_MM is null.
This commit is contained in:
+5
-1
@@ -276,7 +276,11 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m
|
||||
parser->mem_hdlrs.free_fcn(parser->parser);
|
||||
return NULL;
|
||||
}
|
||||
parser->parser->encoding = xmlStrdup(encoding);
|
||||
if (encoding != NULL) {
|
||||
parser->parser->encoding = xmlStrdup(encoding);
|
||||
} else {
|
||||
parser->parser->charset = XML_CHAR_ENCODING_NONE;
|
||||
}
|
||||
if (sep != NULL) {
|
||||
parser->namespace = 1;
|
||||
parser->_ns_map = xmlHashCreate(10);
|
||||
|
||||
Reference in New Issue
Block a user