Merge branch 'PHP-7.0' into PHP-7.1

This commit is contained in:
Nikita Popov 2017-03-02 12:36:04 +01:00
commit bf8c463f5b
3 changed files with 21 additions and 5 deletions

4
NEWS
View file

@ -2,7 +2,9 @@ PHP NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017, PHP 7.1.4 ?? ??? 2017, PHP 7.1.4
- DOM:
. Fixed bug #74004 (LIBXML_NOWARNING flag ingnored on loadHTML*).
(somedaysummer)
16 Mar 2017, PHP 7.1.3 16 Mar 2017, PHP 7.1.3

View file

@ -2038,16 +2038,16 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
RETURN_FALSE; RETURN_FALSE;
} }
if (options) {
htmlCtxtUseOptions(ctxt, (int)options);
}
ctxt->vctxt.error = php_libxml_ctx_error; ctxt->vctxt.error = php_libxml_ctx_error;
ctxt->vctxt.warning = php_libxml_ctx_warning; ctxt->vctxt.warning = php_libxml_ctx_warning;
if (ctxt->sax != NULL) { if (ctxt->sax != NULL) {
ctxt->sax->error = php_libxml_ctx_error; ctxt->sax->error = php_libxml_ctx_error;
ctxt->sax->warning = php_libxml_ctx_warning; ctxt->sax->warning = php_libxml_ctx_warning;
} }
if (options) {
htmlCtxtUseOptions(ctxt, (int)options);
}
htmlParseDocument(ctxt); htmlParseDocument(ctxt);
newdoc = ctxt->myDoc; newdoc = ctxt->myDoc;
htmlFreeParserCtxt(ctxt); htmlFreeParserCtxt(ctxt);

View file

@ -0,0 +1,14 @@
--TEST--
Bug #74004 (DOMDocument->loadHTML and ->loadHTMLFile do not heed LIBXML_NOWARNING and LIBXML_NOERROR options)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$doc=new DOMDocument();
$doc->loadHTML("<tag-throw></tag-throw>",LIBXML_NOERROR);
?>
===DONE===
--EXPECT--
===DONE===