From 0bc6f293d15c18232027ba85cde586bfba226eda Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Fri, 20 Sep 2024 10:39:15 +0200 Subject: [PATCH] Each embedded objectID may only be returned once See https://www.woltlab.com/community/thread/308272-duplicate-entry-28-27-187-2-for-key-messageembeddedobject/ --- .../embedded/object/MediaMessageEmbeddedObjectHandler.class.php | 2 +- .../embedded/object/UnfurlUrlEmbeddedObjectHandler.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/message/embedded/object/MediaMessageEmbeddedObjectHandler.class.php b/wcfsetup/install/files/lib/system/message/embedded/object/MediaMessageEmbeddedObjectHandler.class.php index 0b80f406ead..78b98afa745 100644 --- a/wcfsetup/install/files/lib/system/message/embedded/object/MediaMessageEmbeddedObjectHandler.class.php +++ b/wcfsetup/install/files/lib/system/message/embedded/object/MediaMessageEmbeddedObjectHandler.class.php @@ -38,7 +38,7 @@ public function parse(HtmlInputProcessor $htmlInputProcessor, array $embeddedDat } } - return $mediaIDs; + return \array_unique($mediaIDs); } /** diff --git a/wcfsetup/install/files/lib/system/message/embedded/object/UnfurlUrlEmbeddedObjectHandler.class.php b/wcfsetup/install/files/lib/system/message/embedded/object/UnfurlUrlEmbeddedObjectHandler.class.php index 8ca51145dea..1260dcf3792 100644 --- a/wcfsetup/install/files/lib/system/message/embedded/object/UnfurlUrlEmbeddedObjectHandler.class.php +++ b/wcfsetup/install/files/lib/system/message/embedded/object/UnfurlUrlEmbeddedObjectHandler.class.php @@ -44,6 +44,6 @@ public function parse(HtmlInputProcessor $htmlInputProcessor, array $embeddedDat } } - return $unfurlUrlIDs; + return \array_unique($unfurlUrlIDs); } }