mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00: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:
parent
558d604d83
commit
7b026eff79
1 changed files with 4 additions and 0 deletions
|
@ -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');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue