From: Alexander Ebert Date: Sat, 16 Sep 2023 12:44:36 +0000 (+0200) Subject: Fix the handling of the nullable group description X-Git-Tag: 6.0.0_RC_2~3^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f1f1b6f1e06cfeae4e3326062eea39d5f7ee496;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.exporter.git Fix the handling of the nullable group description See https://www.woltlab.com/community/thread/301633-datenimport-von-5-5-auf-6-0/ --- diff --git a/files/lib/system/exporter/WBB4xExporter.class.php b/files/lib/system/exporter/WBB4xExporter.class.php index 5d81bae..81101f2 100644 --- a/files/lib/system/exporter/WBB4xExporter.class.php +++ b/files/lib/system/exporter/WBB4xExporter.class.php @@ -518,9 +518,11 @@ final class WBB4xExporter extends AbstractExporter $groups = []; $i18nValues = []; while ($row = $statement->fetchArray()) { + $groupDescription = $row['groupDescription'] ?? ''; + $groups[$row['groupID']] = [ 'groupName' => $row['groupName'], - 'groupDescription' => $row['groupDescription'], + 'groupDescription' => $groupDescription, 'groupType' => $row['groupType'], 'priority' => $row['priority'], 'userOnlineMarking' => !empty($row['userOnlineMarking']) ? $row['userOnlineMarking'] : '', @@ -530,8 +532,8 @@ final class WBB4xExporter extends AbstractExporter if (\str_starts_with($row['groupName'], 'wcf.acp.group.group')) { $i18nValues[] = $row['groupName']; } - if (\str_starts_with($row['groupDescription'], 'wcf.acp.group.groupDescription')) { - $i18nValues[] = $row['groupDescription']; + if (\str_starts_with($groupDescription, 'wcf.acp.group.groupDescription')) { + $i18nValues[] = $groupDescription; } }