From: Christian Stocker Date: Sun, 6 Aug 2006 19:38:45 +0000 (+0000) Subject: Fix #38354 (Unwanted reformatting of XML when using AsXML) X-Git-Tag: php-5.2.0RC2~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42982ac3a1c3af8499bb69657985bd7dbc957384;p=php Fix #38354 (Unwanted reformatting of XML when using AsXML) --- diff --git a/NEWS b/NEWS index 37b69e5dcf..ba349ffe3f 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ PHP NEWS - Fixed phpinfo() cutoff of variables at \0. (Ilia) - Fixed a bug in the filter extension that prevented magic_quotes_gpc from being applied when RAW filter is used. (Ilia) +- Fixed bug #38354 (Unwanted reformatting of XML when using AsXML). (Christian) - Fixed bug #38347 (Segmentation fault when using foreach with an unknown/empty SimpleXMLElement). (Tony) - Fixed bug #38322 (reading past array in sscanf() leads to arbitary code diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 7a3a335deb..b8ff4b5933 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1205,7 +1205,7 @@ SXE_METHOD(asXML) RETURN_FALSE; } - xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 1, NULL); + xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, NULL); xmlOutputBufferClose(outbuf); RETURN_TRUE; } @@ -1229,7 +1229,7 @@ SXE_METHOD(asXML) RETURN_FALSE; } - xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 1, ((xmlDocPtr) sxe->document->ptr)->encoding); + xmlNodeDumpOutput(outbuf, (xmlDocPtr) sxe->document->ptr, node, 0, 0, ((xmlDocPtr) sxe->document->ptr)->encoding); xmlOutputBufferFlush(outbuf); strval = xmlStrndup(outbuf->buffer->content, outbuf->buffer->use); strval_len = outbuf->buffer->use;