Hi,
this patch removes the prevaricative code in ext/dom/document.c that
forcibly
reports errors in xml data overriding the error_reporting value set by
the user.
If the user intentionally sets $dom->recover to true and disables E_WARNING
he obviously wants php to shut up in all cases, even when the xml fed to
dom is broken;
php should obediently comply, not take initiatives on its own accord.
Please, consider this patch for inclusion in HEAD.
Nico
--- ext/dom/document.c.orig 2006-01-01 13:50:06.000000000 +0100
+++ ext/dom/document.c 2006-11-03 10:53:18.000000000 +0100
@@ -1512,18 +1512,11 @@
#endif
ctxt->recovery = recover;
- if (recover) {
- old_error_reporting = EG(error_reporting);
- EG(error_reporting) = old_error_reporting | E_WARNING;
- }
xmlParseDocument(ctxt);
if (ctxt->wellFormed || recover) {
ret = ctxt->myDoc;
- if (ctxt->recovery) {
- EG(error_reporting) = old_error_reporting;
- }
/* If loading from memory, set the base reference uri for the document */
if (ret->URL == NULL && ctxt->directory != NULL) {
ret->URL = xmlStrdup(ctxt->directory);
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php