Skip to content

Commit 112e390

Browse files
authored
Disable formatting on signed elements (#52)
1 parent cb73e44 commit 112e390

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/XML/SignedElementTrait.php

Lines changed: 5 additions & 0 deletions
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)