Merge "mw.htmlform: Fix hiding of the textbox for 'selectorother' fields on page...
[lhc/web/wiklou.git] / includes / htmlform / OOUIHTMLForm.php
index 6650321..ed99802 100644 (file)
@@ -191,6 +191,10 @@ class OOUIHTMLForm extends HTMLForm {
         * @return string
         */
        public function getErrorsOrWarnings( $elements, $elementsType ) {
+               if ( $elements === '' ) {
+                       return '';
+               }
+
                if ( !in_array( $elementsType, [ 'error', 'warning' ], true ) ) {
                        throw new DomainException( $elementsType . ' is not a valid type.' );
                }