From 947cf3e76a80952024290fe834381504c37778c9 Mon Sep 17 00:00:00 2001 From: Wouter Van Scharen Date: Thu, 23 Nov 2017 11:53:52 +0100 Subject: [PATCH] Objects in field data break export. Remove objects from the field data before converting the data to a string. --- services/ExportService.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/ExportService.php b/services/ExportService.php index 064dc5a..fc0304b 100644 --- a/services/ExportService.php +++ b/services/ExportService.php @@ -478,6 +478,13 @@ public function parseFieldData($handle, $data) // If it's an object or an array, make it a string if (is_array($data)) { + + $data = array_filter($data, function($element) { + if (!is_object($element)) { + return $element; + } + }); + $data = StringHelper::arrayToString(ArrayHelper::filterEmptyStringsFromArray(ArrayHelper::flattenArray($data)), ', '); }