mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10711] Duplicate key error on forum_tracks_table
In certain situations, an SQL error DUPLICATE ERROR for KEY 'PRIMARY' in the forums_track table is produced when marking forums read (viewforum.php?f=xx&mark=forums). The problem happens when there are duplicates in the forum_id array. The solution is to remove those duplicates. PHPBB3-10711
This commit is contained in:
@@ -1258,6 +1258,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
{
|
||||
$forum_id = array($forum_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_id = array_unique($forum_id);
|
||||
}
|
||||
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
|
Reference in New Issue
Block a user