diff options
author | javiexin <javiexin@gmail.com> | 2015-06-13 01:08:18 +0200 |
---|---|---|
committer | javiexin <javiexin@gmail.com> | 2015-06-13 01:08:18 +0200 |
commit | 7b026eff7980535488fb60e9ecee45e3eb3ac819 (patch) | |
tree | f239a844a08e4fd90d9808daecbe26112ba56d77 /phpBB/includes/functions.php | |
parent | 558d604d83fd5ded2edc854a9944ad0d1188e2e5 (diff) | |
download | forums-7b026eff7980535488fb60e9ecee45e3eb3ac819.tar forums-7b026eff7980535488fb60e9ecee45e3eb3ac819.tar.gz forums-7b026eff7980535488fb60e9ecee45e3eb3ac819.tar.bz2 forums-7b026eff7980535488fb60e9ecee45e3eb3ac819.tar.xz forums-7b026eff7980535488fb60e9ecee45e3eb3ac819.zip |
[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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 573df9e55d..c19f32088c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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'); |