Skip to content

Commit

Permalink
Exclude empty parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Dec 6, 2024
1 parent acf1c20 commit 1a5e982
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/XML/xenc11/AbstractAlgorithmIdentifierType.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ public function toXML(?DOMElement $parent = null): DOMElement
$e = $this->instantiateParentElement($parent);
$e->setAttribute('Algorithm', $this->getAlgorithm());

$this->getParameters()?->toXML($e);
if ($this->getParameters() !== null) {
if (!$this->getParameters()->isEmptyElement()) {
$this->getParameters()->toXML($e);
}
}

return $e;
}
Expand Down

0 comments on commit 1a5e982

Please sign in to comment.