From: Matthias Schmidt Date: Mon, 15 Apr 2019 16:56:43 +0000 (+0200) Subject: Add missing exception in `TSelectionFormField::getOptions()` X-Git-Tag: 5.2.0_Alpha_1~137 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f38dd6c0732fe43000dd99448f17088b299f706;p=GitHub%2FWoltLab%2FWCF.git Add missing exception in `TSelectionFormField::getOptions()` 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 064e1ce4f5..257d15313e 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 @@ -51,6 +51,10 @@ trait TSelectionFormField { * @throws \BadMethodCallException if no options have been set */ public function getOptions() { + if ($this->options === null) { + throw new \BadMethodCallException("No options have been set."); + } + return $this->options; }