1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Merge pull request #8788 from weirdan/fix-xml-report-crashes-on-8.1

Fixes https://github.com/vimeo/psalm/issues/8321
This commit is contained in:
Bruce Weirdan 2022-11-28 18:11:33 -04:00 committed by GitHub
commit 6fff6dfc65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,9 @@ final class XmlReport extends Report
);
}
// 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,
@ -36,6 +39,9 @@ final class XmlReport extends Report
);
}
// replace null values, as XML serializers tend to have problems with them
$issue_data['other_references'] ??= '';
return $issue_data;
},
$this->issues_data