From 3fb7e23aff1d1e1b3124cd48e6479d1bb8578442 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 17 Oct 2016 23:29:02 +0200 Subject: [PATCH] Fixed issue in embedded object manager --- .../object/MessageEmbeddedObjectManager.class.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php b/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php index c378588cb7..d464ebcddc 100644 --- a/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php +++ b/wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php @@ -170,15 +170,12 @@ class MessageEmbeddedObjectManager extends SingletonFactory { $statement->execute($conditionBuilder->getParameters()); $embeddedObjects = []; while ($row = $statement->fetchArray()) { - if (isset($this->embeddedObjects[$row['embeddedObjectTypeID']][$row['embeddedObjectID']])) { - // embedded object already loaded - continue; + if (!isset($this->embeddedObjects[$row['embeddedObjectTypeID']][$row['embeddedObjectID']])) { + // group objects by object type + if (!isset($embeddedObjects[$row['embeddedObjectTypeID']])) $embeddedObjects[$row['embeddedObjectTypeID']] = []; + $embeddedObjects[$row['embeddedObjectTypeID']][] = $row['embeddedObjectID']; } - // group objects by object type - if (!isset($embeddedObjects[$row['embeddedObjectTypeID']])) $embeddedObjects[$row['embeddedObjectTypeID']] = []; - $embeddedObjects[$row['embeddedObjectTypeID']][] = $row['embeddedObjectID']; - // store message to embedded object assignment if (!isset($this->messageEmbeddedObjects[$row['messageObjectTypeID']][$row['messageID']][$row['embeddedObjectTypeID']])) { $this->messageEmbeddedObjects[$row['messageObjectTypeID']][$row['messageID']][$row['embeddedObjectTypeID']] = []; -- 2.20.1