Fix check for form field validation
authorMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:21:26 +0000 (17:21 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:21:26 +0000 (17:21 +0200)
See #2509

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

index 567b4180ed7a1642d9d4553e8eedf164f791c7f4..e37c5edfb10dcc63e458fc28917a56f2dc4af6ff 100644 (file)
@@ -291,7 +291,7 @@ trait TFormParentNode {
                        foreach ($this->children() as $child) {
                                // call `checkDependencies()` on form fields here so that their validate
                                // method does not have to do it
-                               if ($child instanceof IFormField && $child->isAvailable() && !$child->checkDependencies()) {
+                               if ($child instanceof IFormField && (!$child->isAvailable() || !$child->checkDependencies())) {
                                        continue;
                                }