Fix a potential NULL value for usernames
authorAlexander Ebert <ebert@woltlab.com>
Tue, 28 May 2024 12:22:51 +0000 (14:22 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 28 May 2024 12:22:51 +0000 (14:22 +0200)
files/lib/system/exporter/PhpBB31xExporter.class.php

index df2b033b3e5fff0649f85f70b7e969cb862ca5b7..3d2acc371219da2db625d85717b301a8dc532b56 100644 (file)
@@ -1162,7 +1162,7 @@ final class PhpBB31xExporter extends AbstractExporter
                 'topic' => StringUtil::decodeHTML($row['topic_title']),
                 'time' => $row['topic_time'],
                 'userID' => $row['topic_poster'],
-                'username' => $row['topic_first_poster_name'],
+                'username' => $row['topic_first_poster_name'] ?: '',
                 'views' => $row['topic_views'],
                 'isAnnouncement' => ($row['topic_type'] == self::TOPIC_TYPE_ANNOUCEMENT || $row['topic_type'] == self::TOPIC_TYPE_GLOBAL) ? 1 : 0,
                 'isSticky' => $row['topic_type'] == self::TOPIC_TYPE_STICKY ? 1 : 0,