Skip to content

Commit c085fef

Browse files
committed
Fix exporting of boolean values
1 parent 6d43c26 commit c085fef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Transformers/DataArrayTransformer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ protected function buildColumnByCollection(array $row, Collection $columns, stri
6666
/**
6767
* Decode content to a readable text value.
6868
*
69-
* @param string $data
69+
* @param bool|string $data
7070
* @return string
7171
*/
72-
protected function decodeContent(string $data): string
72+
protected function decodeContent(bool|string $data): string
7373
{
7474
try {
75+
if (is_bool($data)) {
76+
return $data ? 'True' : 'False';
77+
}
78+
7579
$decoded = html_entity_decode(trim(strip_tags($data)), ENT_QUOTES, 'UTF-8');
7680

7781
return str_replace("\xc2\xa0", ' ', $decoded);

0 commit comments

Comments
 (0)