// $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 ) {