1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00

fix preserveWhiteSpace on document load

This commit is contained in:
Rob Richards
2003-09-24 12:56:37 +00:00
parent f7d32e30b0
commit f9640d5fad
+5
View File
@@ -26,6 +26,7 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
#include <libxml/SAX.h>
typedef struct _idsIterator idsIterator;
struct _idsIterator {
@@ -1270,8 +1271,12 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source TSRMLS_DC)
ctxt->vctxt.error = php_dom_ctx_error;
ctxt->vctxt.warning = php_dom_ctx_error;
if (ctxt->sax != NULL) {
ctxt->sax->error = php_dom_ctx_error;
if (ctxt->keepBlanks == 0) {
ctxt->sax->ignorableWhitespace = ignorableWhitespace;
}
}
xmlParseDocument(ctxt);