Fix issue when importing users (WBB4+)
authorMarcel Werk <burntime@woltlab.com>
Mon, 27 Nov 2023 13:50:14 +0000 (14:50 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 27 Nov 2023 13:50:14 +0000 (14:50 +0100)
Fix an error if no groups or languages were assigned to a user.

files/lib/system/exporter/WBB4xExporter.class.php

index 81101f281e78b7cfaa54b7e9f76907a1dc033701..3d6817dff1b35a73a2fb1ea522cd223cec02630c 100644 (file)
@@ -645,8 +645,8 @@ final class WBB4xExporter extends AbstractExporter
                 'authData' => $row['authData'],
             ];
             $additionalData = [
-                'groupIDs' => \explode(',', $row['groupIDs']),
-                'languages' => \explode(',', $row['languageCodes']),
+                'groupIDs' => $row['groupIDs'] ? \explode(',', $row['groupIDs']) : [],
+                'languages' => $row['languageCodes'] ? \explode(',', $row['languageCodes']) : [],
                 'options' => [],
             ];