Skip to content

Commit

Permalink
Merge branch '3.0' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 27, 2024
2 parents de0f5e9 + c169fad commit 6a551f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataFormatter/XMLDataFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function convertDataObjectWithoutHeader(DataObject $obj, $fields = null,
continue;
}
$fieldValue = $obj->obj($fieldName)->forTemplate();
if (!mb_check_encoding($fieldValue, 'utf-8')) {
if (isset($fieldValue) && !mb_check_encoding($fieldValue, 'utf-8')) {
$fieldValue = "(data is badly encoded)";
}

Expand Down

0 comments on commit 6a551f0

Please sign in to comment.