Skip to content

Commit f5e34d3

Browse files
authored
Disable formatting on signed elements
1 parent 131a2a8 commit f5e34d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/XML/SignedElementTrait.php

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ public function getSignature(): ?Signature
7474
*/
7575
protected function setSignature(Signature $signature): void
7676
{
77+
/**
78+
* By disabling formatting on signed objects, we prevent issues with invalid signatures later on
79+
* at the cost of some whitespace taking up useless bytes in the outputted document.
80+
*/
81+
$this->formatOutput = false;
7782
$this->signature = $signature;
7883
}
7984

0 commit comments

Comments
 (0)