This commit is contained in:
Ed Wilde 2024-10-15 11:58:03 +13:00 committed by GitHub
commit 38fb0f86cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,7 +126,7 @@ class XMLDataFormatter extends DataFormatter
continue; continue;
} }
$fieldValue = $obj->obj($fieldName)->forTemplate(); $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)"; $fieldValue = "(data is badly encoded)";
} }