From 99b51e65c1482075e6d37f2ee43728b52461b769 Mon Sep 17 00:00:00 2001 From: matthew Date: Sat, 1 Jun 2019 11:39:03 -0500 Subject: [PATCH] Added array_unique to set_tags to prevent primary key violations when upload conflict is set to merge --- core/imageboard/image.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/imageboard/image.php b/core/imageboard/image.php index a5d90979..5d31ff90 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -570,6 +570,8 @@ class Image { global $database; + $unfiltered_tags = array_unique($unfiltered_tags); + $tags = []; foreach ($unfiltered_tags as $tag) { if (mb_strlen($tag, 'UTF-8') > 255) {