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 5, 2024
1 parent acf1c20 commit 993cb7e
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);

Check failure on line 64 in src/XML/xenc11/AbstractAlgorithmIdentifierType.php

View workflow job for this annotation

GitHub Actions / Quality control

Using nullsafe method call on non-nullable type SimpleSAML\XMLSecurity\XML\xenc11\Parameters. Use -> instead.

Check failure on line 64 in src/XML/xenc11/AbstractAlgorithmIdentifierType.php

View workflow job for this annotation

GitHub Actions / Quality control

Using nullsafe method call on non-nullable type SimpleSAML\XMLSecurity\XML\xenc11\Parameters. Use -> instead.
}
}

return $e;
}
Expand Down

0 comments on commit 993cb7e

Please sign in to comment.