From 1a1b0ee27d9c654529acd956a0f25145c705e5b7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 29 Jul 2023 06:17:09 +0200 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/7787 --- app/Services/Internal/Support/JournalServiceTrait.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/Internal/Support/JournalServiceTrait.php b/app/Services/Internal/Support/JournalServiceTrait.php index 8f3c0811d0..f82bfd83db 100644 --- a/app/Services/Internal/Support/JournalServiceTrait.php +++ b/app/Services/Internal/Support/JournalServiceTrait.php @@ -493,10 +493,11 @@ trait JournalServiceTrait if ('' !== $string) { $tag = $this->tagFactory->findOrCreate($string); if (null !== $tag) { - $set[] = $tag->id; + $set[] = (int)$tag->id; } } } + $set = array_unique($set); Log::debug('End of loop.'); Log::debug(sprintf('Total nr. of tags: %d', count($tags)), $tags); $journal->tags()->sync($set);