com php-src: Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)": ext/dom/document.c ext/dom/tests/DOMDocument_savexml_basic2.phpt

[email protected] (Anatol Belski)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    69a2e4ece2abf304c616831509d7870c13d23d3b
Author:    Anatol Belski <[email protected]>         Wed, 1 Feb 2017 19:59:18 +0100
Parents:   3f89b630b4c35f5ddff7318e2d2be46cf59d2d21
Branches:  PHP-7.0 PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=69a2e4ece2abf304c616831509d7870c13d23d3b

Log:
Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"

This reverts commit 62938bf08806129b42b17e74d79a450c30d4ff30.

Bugs:
https://bugs.php.net/2346
https://bugs.php.net/2454

Changed paths:
  M  ext/dom/document.c
  D  ext/dom/tests/DOMDocument_savexml_basic2.phpt


Diff:
diff --git a/ext/dom/document.c b/ext/dom/document.c
index d8e950d..c7e4f8e 100644
--- a/ext/dom/document.c
+++ b/ext/dom/document.c
@@ -1628,9 +1628,6 @@ 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) {
diff --git a/ext/dom/tests/DOMDocument_savexml_basic2.phpt b/ext/dom/tests/DOMDocument_savexml_basic2.phpt
deleted file mode 100644
index 7c01014..0000000
--- a/ext/dom/tests/DOMDocument_savexml_basic2.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-DOM Document: saveXML with createElement and formatOutput
---CREDITS--
-CHU Zhaowei <[email protected]>
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-$dom = new domDocument('1.0', 'UTF-8');
-$dom->formatOutput = true;
-
-$root = $dom->createElement('root');
-$dom->appendChild($root);
-
-$child1 = $dom->createElement('testsuite');
-$root->appendChild($child1);
-
-$child11 = $dom->createElement('testcase');
-$child11->setAttribute('name', 'leaf1');
-$child12 = $dom->createElement('testcase');
-$child12->setAttribute('name', 'leaf2');
-$child1->appendChild($child11);
-$child1->appendChild($child12);
-
-echo $dom->saveXml();
---EXPECT--
-<?xml version="1.0" encoding="UTF-8"?>
-<root>
-  <testsuite>
-    <testcase name="leaf1"/>
-    <testcase name="leaf2"/>
-  </testsuite>
-</root>
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.