Skip to content

Commit

Permalink
Merge pull request #8788 from weirdan/fix-xml-report-crashes-on-8.1
Browse files Browse the repository at this point in the history
Fixes #8321
  • Loading branch information
weirdan committed Nov 28, 2022
2 parents 9d597cf + 874eb7d commit 6fff6df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Psalm/Report/XmlReport.php
Expand Up @@ -29,13 +29,19 @@ static function (IssueData $issue_data): array {
);
}

// replace null values, as XML serializers tend to have problems with them
$issue_data['taint_trace'] ??= '';

if (null !== $issue_data['other_references']) {
$issue_data['other_references'] = array_map(
static fn(DataFlowNodeData $reference): array => (array) $reference,
$issue_data['other_references']
);
}

// replace null values, as XML serializers tend to have problems with them
$issue_data['other_references'] ??= '';

return $issue_data;
},
$this->issues_data
Expand Down

0 comments on commit 6fff6df

Please sign in to comment.