From: mutec Date: Thu, 22 Aug 2019 15:43:22 +0000 (+0200) Subject: Fix TMultipleFormField::getMaximumMultiples() return value if multiples not supported... X-Git-Tag: 5.2.0_Beta_1~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cce298b9a8c868174e1f38a005ad892567969ef6;p=GitHub%2FWoltLab%2FWCF.git Fix TMultipleFormField::getMaximumMultiples() return value if multiples not supported (#3050) --- diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php index 5447d09e8c..65ad42b85e 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php @@ -51,7 +51,7 @@ trait TMultipleFormField { * @return int maximum number of values */ public function getMaximumMultiples() { - return $this->maximumMultiples; + return $this->allowsMultiple() ? $this->maximumMultiples : 1; } /**