X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fhtmlform%2Ffields%2FHTMLTitlesMultiselectField.php;h=bd1d2d3f8e038159bd4fa0e11ed7f2715cdfeacc;hp=1cfbd5fef75dcf3b07e85c0e1cec5c22bf0c8cd6;hb=a38af7ba26579bb3004f673e44d39710887763aa;hpb=04179d3a5ce90f3f967d0e004fdf68bd45b04541 diff --git a/includes/htmlform/fields/HTMLTitlesMultiselectField.php b/includes/htmlform/fields/HTMLTitlesMultiselectField.php index 1cfbd5fef7..bd1d2d3f8e 100644 --- a/includes/htmlform/fields/HTMLTitlesMultiselectField.php +++ b/includes/htmlform/fields/HTMLTitlesMultiselectField.php @@ -53,10 +53,8 @@ class HTMLTitlesMultiselectField extends HTMLTitleTextField { // $value is a string, because HTMLForm fields store their values as strings $titlesArray = explode( "\n", $value ); - if ( isset( $this->mParams['max'] ) ) { - if ( count( $titlesArray ) > $this->mParams['max'] ) { - return $this->msg( 'htmlform-int-toohigh', $this->mParams['max'] ); - } + if ( isset( $this->mParams['max'] ) && ( count( $titlesArray ) > $this->mParams['max'] ) ) { + return $this->msg( 'htmlform-int-toohigh', $this->mParams['max'] ); } foreach ( $titlesArray as $title ) {