Skip to content

Commit cb521bf

Browse files
committed
Fix migration errors with deleted users
1 parent 5b699af commit cb521bf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

migrations/m9_remove_idea_bot.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ public function update_topic_authors()
7373
while ($row = $this->db->sql_fetchrow($result))
7474
{
7575
$topics[$row['topic_id']] = [
76-
'topic_poster_id' => $row['idea_author'],
77-
'topic_poster_name' => $row['username'],
78-
'topic_poster_colour' => $row['user_colour'],
79-
'topic_first_post_id' => $row['topic_first_post_id'],
76+
'topic_poster_id' => $row['idea_author'] ?: ANONYMOUS,
77+
'topic_poster_name' => $row['username'] ?: '',
78+
'topic_poster_colour' => $row['user_colour'] ?: '',
79+
'topic_first_post_id' => $row['topic_first_post_id'] ?: 0,
8080
];
8181
}
8282
$this->db->sql_freeresult($result);

0 commit comments

Comments
 (0)