From: Matthias Schmidt Date: Tue, 31 Jul 2018 14:42:09 +0000 (+0200) Subject: Fix `TSelectionFormField::_options = null` if no options are passed X-Git-Tag: 5.2.0_Alpha_1~680^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd4434fbca9366e38be1961f682f3dd1f374bd8b;p=GitHub%2FWoltLab%2FWCF.git Fix `TSelectionFormField::_options = null` if no options are passed See #2509 --- 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 = []; }