summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index cab0aa55ce..a884087f5f 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);