Skip to content

Commit

Permalink
Validate well-formed XML for record content
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-meyer committed Jan 8, 2024
1 parent 2dc049a commit c0321ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Database/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ protected function validate(string $xml): string
$xml,
[
new Assert\Type('string'),
// TODO: Validate well-formed XML.
new Assert\NotBlank()
]
);
if ($violations->count() > 0) {
if ($violations->count() > 0
or simplexml_load_string($xml) === false) {
throw new ValidationFailedException(null, $violations);
}
return $xml;
Expand Down

0 comments on commit c0321ab

Please sign in to comment.