Fix exception when reading value of field without immutability support
authorMatthias Schmidt <gravatronics@live.com>
Thu, 24 Jan 2019 17:24:07 +0000 (18:24 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 24 Jan 2019 17:24:07 +0000 (18:24 +0100)
See #2509
See aa6f853584182980c1c7d12891b689317e458b8b

wcfsetup/install/files/lib/system/form/builder/TFormParentNode.class.php

index b581866e42417e9a9a5071f92fe8c78bbebae16e..c9fa7b8fed44abe796d07c42ca7bc7c8e15d7077 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\system\form\builder;
 use wcf\system\form\builder\field\IFormField;
+use wcf\system\form\builder\field\IImmutableFormField;
 
 /**
  * Provides default implementations of `IFormParentNode` methods.
@@ -271,7 +272,7 @@ trait TFormParentNode {
                                if ($child instanceof IFormParentNode) {
                                        $child->readValues();
                                }
-                               else if ($child instanceof IFormField && $child->isAvailable() && !$child->isImmutable()) {
+                               else if ($child instanceof IFormField && $child->isAvailable() && (!($child instanceof IImmutableFormField) || !$child->isImmutable())) {
                                        $child->readValue();
                                }
                        }