Properly set properties for option-less selection form fields
authorMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:23:06 +0000 (17:23 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 7 Jul 2018 15:23:06 +0000 (17:23 +0200)
See #2509

wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php

index c52f5f186a0b5049e8a7e82a8781ad5770d0ad59..6dbf415b4a2ec5e48f1dd74c458bcc7feaab1529 100644 (file)
@@ -244,6 +244,11 @@ trait TSelectionFormField {
                        }
                }
                
+               if ($this->__options === null) {
+                       $this->__options = [];
+                       $this->__nestedOptions = [];
+               }
+               
                return $this;
        }