Fix TMultipleFormField::getMaximumMultiples() return value if multiples not supported...
authormutec <mutec@users.noreply.github.com>
Thu, 22 Aug 2019 15:43:22 +0000 (17:43 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 22 Aug 2019 15:43:22 +0000 (17:43 +0200)
wcfsetup/install/files/lib/system/form/builder/field/TMultipleFormField.class.php

index 5447d09e8c72dd666298b76db27b9431b3bd90ab..65ad42b85e15bdad24240273fd0b8754636383f8 100644 (file)
@@ -51,7 +51,7 @@ trait TMultipleFormField {
         * @return      int     maximum number of values
         */
        public function getMaximumMultiples() {
-               return $this->maximumMultiples;
+               return $this->allowsMultiple() ? $this->maximumMultiples : 1;
        }
        
        /**