summaryrefslogtreecommitdiff
path: root/ext/dom/document.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dom/document.c')
-rw-r--r--ext/dom/document.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/dom/document.c b/ext/dom/document.c
index 0086d13c41..9250b92700 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -1628,6 +1628,9 @@ PHP_FUNCTION(dom_document_savexml)
doc_props = dom_get_doc_props(intern->document);
format = doc_props->formatoutput;
+ if (format) {
+ options = options | XML_SAVE_FORMAT;
+ }
buf = xmlBufferCreate();
if (!buf) {