Skip to content

Commit

Permalink
Merge pull request #21 from remicollet/issue-20
Browse files Browse the repository at this point in the history
Do not use escaper when no value to escape is provided
  • Loading branch information
Ocramius committed Dec 3, 2021
2 parents 6ac2083 + 089bec7 commit 7eba710
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Formatter/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ protected function buildElementTree(DOMDocument $doc, DOMElement $rootElement, $
$value = $this->getEscaper()->escapeHtml(
'"Object" of type ' . get_class($value) . " does not support __toString() method"
);
} else {
} elseif ($value) {
$value = $this->getEscaper()->escapeHtml($value);
}

Expand Down

0 comments on commit 7eba710

Please sign in to comment.