Fix #38354 (Unwanted reformatting of XML when using AsXML)

This commit is contained in:
Christian Stocker 2006-08-06 19:38:45 +00:00
parent 07b5c8fe2a
commit 42982ac3a1
2 changed files with 3 additions and 2 deletions

1
NEWS
View File

@ -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

View File

@ -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;