Fix reading existing poll's data in form builder
authorMatthias Schmidt <gravatronics@live.com>
Sat, 25 Jan 2020 18:54:13 +0000 (19:54 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 25 Jan 2020 18:54:13 +0000 (19:54 +0100)
wcfsetup/install/files/lib/system/form/builder/container/wysiwyg/WysiwygPollFormContainer.class.php

index 69942e72b9c72bc84b2c56197f4a5ddb776f741e..b9f1b3c423107d9f8ec8e57491c180a0cd7e813c 100644 (file)
@@ -227,8 +227,8 @@ class WysiwygPollFormContainer extends FormContainer implements IObjectTypeFormN
         * @inheritDoc
         */
        public function updatedObject(array $data, IStorableObject $object, $loadValues = true) {
-               if ($loadValues && $data instanceof IPollContainer && $data->getPollID() !== null) {
-                       $this->poll = new Poll($data->getPollID());
+               if ($loadValues && $object instanceof IPollContainer && $object->getPollID() !== null) {
+                       $this->poll = new Poll($object->getPollID());
                        if (!$this->poll->pollID) {
                                $this->poll = null;
                        }