diff --git a/typo3/sysext/impexp/Classes/Export.php b/typo3/sysext/impexp/Classes/Export.php
index 1d418d60e6d229b03e19baf16277fcce001c406b..8ca7b0808c29ee625d5d10ef435f7af99eb05dc5 100644
--- a/typo3/sysext/impexp/Classes/Export.php
+++ b/typo3/sysext/impexp/Classes/Export.php
@@ -480,14 +480,14 @@ class Export extends ImportExport
             foreach ($addR as $fI) {
                 // Get and set record:
                 $row = BackendUtility::getRecord($fI['table'], $fI['id']);
-                // Depending on db driver, int fields may or may not be returned as integer or as string. The
-                // loop aligns that detail and forces strings for everything to have exports more db agnostic.
-                foreach ($row as $fieldName => $value) {
-                    // Keep null but force everything else to string
-                    $row[$fieldName] = $value === null ? $value : (string)$value;
-                }
 
                 if (is_array($row)) {
+                    // Depending on db driver, int fields may or may not be returned as integer or as string. The
+                    // loop aligns that detail and forces strings for everything to have exports more db agnostic.
+                    foreach ($row as $fieldName => $value) {
+                        // Keep null but force everything else to string
+                        $row[$fieldName] = $value === null ? $value : (string)$value;
+                    }
                     $this->export_addRecord($fI['table'], $row, $relationLevel + 1);
                 }
                 // Set status message