Allow empty input in namespaces multiselect on Special:Block
authorThalia <thalia.e.chan@googlemail.com>
Thu, 18 Jul 2019 14:48:09 +0000 (15:48 +0100)
committerThalia <thalia.e.chan@googlemail.com>
Thu, 18 Jul 2019 16:04:26 +0000 (17:04 +0100)
Follow-up to 83ebbb519f

Bug: T219882
Change-Id: I5f3d907a8f8be02f9e2c23d2a66c42752daa38b5

includes/htmlform/fields/HTMLNamespacesMultiselectField.php

index cbcd3ba..860a351 100644 (file)
@@ -28,7 +28,7 @@ class HTMLNamespacesMultiselectField extends HTMLSelectNamespace {
        }
 
        public function validate( $value, $alldata ) {
-               if ( !$this->mParams['exists'] ) {
+               if ( !$this->mParams['exists'] || $value === '' ) {
                        return true;
                }