com php-src: Revert "Merge branch 'pull-request/2344' into PHP-7.0": NEWS ext/dom/document.c ext/dom/tests/bug74004.phpt
| From: | Nikita Popov | Date: | Fri, 03 Feb 2017 17:42:10 +0000 |
| Subject: | com php-src: Revert "Merge branch 'pull-request/2344' into PHP-7.0": NEWS ext/dom/document.c ext/dom/tests/bug74004.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-97008@lists.php.net to get a copy of this message | ||
Commit: dcaf4da8a6832f5bc1d0dabee08686cd5cf9e801
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 3 Feb 2017 18:41:36 +0100
Parents: 9ffc6ca62f53431a4b32b30cdda8180142f47cdb
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dcaf4da8a6832f5bc1d0dabee08686cd5cf9e801
Log:
Revert "Merge branch 'pull-request/2344' into PHP-7.0"
This reverts commit 6988d070ea8c7d44452d8c98e594d65ea722a1d8, reversing
changes made to 75ad2b301a047209e7b5a6b5912eb589cfbc773d.
Changed paths:
M NEWS
M ext/dom/document.c
D ext/dom/tests/bug74004.phpt
Diff:
diff --git a/NEWS b/NEWS
index e2878e0..102c9ea 100644
--- a/NEWS
+++ b/NEWS
@@ -8,10 +8,6 @@ PHP NEWS
. Fixed bug #73998 (array_key_exists fails on arrays created by
get_object_vars). (mhagstrand)
-- DOM:
- . Fixed bug #74004 (LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML).
- (somedaysummer)
-
- GD:
. Fixed bug #74031 (ReflectionFunction for imagepng is missing last two
parameters). (finwe)
diff --git a/ext/dom/document.c b/ext/dom/document.c
index a884087..cab0aa5 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 853dfa5..0000000
--- 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--
-<?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