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 committed Jul 30, 2024
1 parent cb73e44 commit ff6f14f
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 ff6f14f

Please sign in to comment.