mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Merge branch 'PHP-7.1'
This commit is contained in:
commit
000b504b51
2 changed files with 4 additions and 19 deletions
|
@ -2038,6 +2038,9 @@ 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;
|
||||||
|
@ -2045,9 +2048,6 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
|
||||||
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);
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
--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();
|
|
||||||
libxml_use_internal_errors(true);
|
|
||||||
$doc->loadHTML("<tag-throw-warning></tag-throw-warning>",LIBXML_NOWARNING|LIBXML_NOERROR);
|
|
||||||
print count(libxml_get_errors());
|
|
||||||
|
|
||||||
?>
|
|
||||||
--EXPECT--
|
|
||||||
0
|
|
Loading…
Add table
Add a link
Reference in a new issue