From dd4434fbca9366e38be1961f682f3dd1f374bd8b Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 31 Jul 2018 16:42:09 +0200 Subject: [PATCH] Fix `TSelectionFormField::_options = null` if no options are passed See #2509 --- .../system/form/builder/field/TSelectionFormField.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php index 26dddcc92b..dbfa5e4bc8 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php @@ -160,6 +160,7 @@ trait TSelectionFormField { $options = $dboOptions; } + $this->__options = []; if ($nestedOptions) { foreach ($options as $key => &$option) { if (!is_array($option)) { @@ -252,8 +253,7 @@ trait TSelectionFormField { } } - if ($this->__options === null) { - $this->__options = []; + if ($this->__nestedOptions === null) { $this->__nestedOptions = []; } -- 2.20.1