From: Matthias Schmidt Date: Sat, 16 Mar 2019 14:45:21 +0000 (+0100) Subject: Fix typos in form builder documentation and exceptions X-Git-Tag: 5.2.0_Alpha_1~214 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=75aa3be9316d4f593fe0a32ad01e4b3071896b9e;p=GitHub%2FWoltLab%2FWCF.git Fix typos in form builder documentation and exceptions See #2509 --- diff --git a/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php b/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php index eec6be8a2c..95bfca3d31 100644 --- a/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/TFormElement.class.php @@ -35,7 +35,7 @@ trait TFormElement { * @param array $variables additional variables used when resolving the language item * @return static this element * - * @throws \InvalidArgumentException if the given description is no or otherwise is invalid + * @throws \InvalidArgumentException if the given description is no string or otherwise is invalid */ public function description($languageItem = null, array $variables = []) { if ($languageItem === null) { @@ -83,7 +83,7 @@ trait TFormElement { * @param array $variables additional variables used when resolving the language item * @return static this element * - * @throws \InvalidArgumentException if the given label is no or otherwise is invalid + * @throws \InvalidArgumentException if the given label is no string or otherwise is invalid */ public function label($languageItem = null, array $variables = []) { if ($languageItem === null) { @@ -95,7 +95,7 @@ trait TFormElement { } else { if (!is_string($languageItem)) { - throw new \InvalidArgumentException("Given description language item is no string, " . gettype($languageItem) . " given."); + throw new \InvalidArgumentException("Given label language item is no string, " . gettype($languageItem) . " given."); } $this->label = WCF::getLanguage()->getDynamicVariable($languageItem, $variables);