Skip to content

Commit

Permalink
Merge branch '3' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 26, 2024
2 parents 62a47ff + 6a551f0 commit 48bad74
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="Default">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<directory suffix=".php">tests/</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Default">
<directory>tests/</directory>
</testsuite>
</testsuites>
</phpunit>
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 48bad74

Please sign in to comment.