diff --git a/ext/dom/document.c b/ext/dom/document.c index cac68300775..18d652064e5 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2038,16 +2038,16 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ RETURN_FALSE; } - + if (options) { + htmlCtxtUseOptions(ctxt, (int)options); + } + ctxt->vctxt.error = php_libxml_ctx_error; ctxt->vctxt.warning = php_libxml_ctx_warning; if (ctxt->sax != NULL) { ctxt->sax->error = php_libxml_ctx_error; ctxt->sax->warning = php_libxml_ctx_warning; } - if (options) { - htmlCtxtUseOptions(ctxt, (int)options); - } htmlParseDocument(ctxt); newdoc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); diff --git a/ext/dom/tests/bug74004.phpt b/ext/dom/tests/bug74004.phpt deleted file mode 100644 index 853dfa5b091..00000000000 --- a/ext/dom/tests/bug74004.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #74004 (DOMDocument->loadHTML and ->loadHTMLFile do not heed LIBXML_NOWARNING and LIBXML_NOERROR options) ---SKIPIF-- - ---FILE-- -loadHTML("",LIBXML_NOWARNING|LIBXML_NOERROR); -print count(libxml_get_errors()); - -?> ---EXPECT-- -0