Fix the export of users from vB 3.x
authorAlexander Ebert <ebert@woltlab.com>
Tue, 15 Aug 2023 12:13:40 +0000 (14:13 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 15 Aug 2023 12:13:40 +0000 (14:13 +0200)
files/lib/system/exporter/VB3or4xExporter.class.php

index c5a424501c89bb7ca8793855c8f5889c40096d32..861c8dbdb130e09965a91535606aa2a21ca36efe 100644 (file)
@@ -523,12 +523,12 @@ class VB3or4xExporter extends AbstractExporter
                 'email' => StringUtil::decodeHTML($row['email']),
                 'registrationDate' => $row['joindate'],
                 'banned' => $row['liftdate'] !== null && $row['liftdate'] == 0 ? 1 : 0,
-                'banReason' => StringUtil::decodeHTML($row['banReason']),
+                'banReason' => StringUtil::decodeHTML($row['banReason'] ?? ''),
                 'activationCode' => $row['activationType'] !== null && $row['activationType'] == 0 && $row['emailchange'] == 0 ? UserRegistrationUtil::getActivationCode() : 0, // vB's codes are strings
                 'oldUsername' => '',
                 // TODO: check whether this is the registration IP
                 'registrationIpAddress' => UserUtil::convertIPv4To6($row['ipaddress']),
-                'signature' => self::fixBBCodes($row['signature']),
+                'signature' => self::fixBBCodes($row['signature'] ?? ''),
                 'userTitle' => ($row['customtitle'] != 0) ? StringUtil::decodeHTML($row['usertitle']) : '',
                 'lastActivityTime' => $row['lastactivity'],
             ];