Skip to content

Commit

Permalink
Disable formatting on signed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen authored Jul 30, 2024
1 parent 131a2a8 commit f5e34d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/XML/SignedElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public function getSignature(): ?Signature
*/
protected function setSignature(Signature $signature): void
{
/**
* By disabling formatting on signed objects, we prevent issues with invalid signatures later on
* at the cost of some whitespace taking up useless bytes in the outputted document.
*/
$this->formatOutput = false;
$this->signature = $signature;
}

Expand Down

0 comments on commit f5e34d3

Please sign in to comment.