On 9.2.2007 18:10 Uhr, Nico Sabbi wrote: > > may I re-propose the attached patch? The first time it was ignored, but > the current behaviour of > dom module is extremely annoying
Completely out of context your post, but I was the one who wrote that part of code, since I was more or less forced to implement it the way it is. I'm fine with removing it, but there were big objections against the whole recover stuff back then when I committed it, so the way it works currently was some kind of compromise See also: http://blog.bitflux.ch/archive/2004/08/13/parsing_non_well_formed_xml_documents_in_php.html http://blog.bitflux.ch/archive/2004/08/20/parsing_non_well_formed_xml_documents_considered_harmful.html and don't forget the comments :) Unfortunately, I couldn't find the posts regarding this matter in the archives. chregu > > > ------------------------------------------------------------------------ > > --- 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); > > > -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 44 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | GPG 0x5CE1DECB -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php