Fix potential NULL values
authorMarcel Werk <burntime@woltlab.com>
Thu, 4 Jul 2024 09:32:18 +0000 (11:32 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 4 Jul 2024 09:32:18 +0000 (11:32 +0200)
files/lib/system/exporter/Kunena3xExporter.class.php

index 6e3c77f778481923bf71aa5e2341009b0587a0c4..d35048b49979a2d722b23eb7a0401a4bc09ef9d7 100644 (file)
@@ -232,17 +232,17 @@ final class Kunena3xExporter extends AbstractExporter
                 'banned' => $row['banned'] ? 1 : 0,
                 'registrationDate' => @\strtotime($row['registerDate']),
                 'lastActivityTime' => @\strtotime($row['lastvisitDate']),
-                'signature' => self::fixBBCodes($row['signature']),
+                'signature' => self::fixBBCodes($row['signature'] ?: ''),
             ];
 
             // get user options
             $options = [
-                'location' => $row['location'],
-                'birthday' => $row['birthdate'],
-                'icq' => $row['icq'],
-                'skype' => $row['skype'],
-                'homepage' => $row['websiteurl'],
-                'gender' => $row['gender'],
+                'location' => $row['location'] ?: '',
+                'birthday' => $row['birthdate'] ?: '',
+                'icq' => $row['icq'] ?: '',
+                'skype' => $row['skype'] ?: '',
+                'homepage' => $row['websiteurl'] ?: '',
+                'gender' => $row['gender'] ?: '',
             ];
 
             $additionalData = [