Skip to content

Commit 0380be3

Browse files
committed
Properly normalize documents
1 parent 4988cc7 commit 0380be3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/XML/SerializableElementTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ public function __toString(): string
4343

4444
if (static::getNormalization() === true) {
4545
$normalized = DOMDocumentFactory::normalizeDocument($doc);
46+
$normalized->normalizeDocument();
4647
return $normalized->saveXML($normalized->firstChild);
4748
}
4849

50+
$doc->normalizeDocument();
4951
return $doc->saveXML($doc->firstChild);
5052
}
5153

0 commit comments

Comments
 (0)