Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358507 )

Change subject: Do not try to parse empty argument in getErrorsOrWarnings in 
OOUI
......................................................................

Do not try to parse empty argument in getErrorsOrWarnings in OOUI

Bug: T167644
Change-Id: I0dcb9bd51ad0cecbdab868fed056b4077d1c9fa8
---
M includes/htmlform/OOUIHTMLForm.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/358507/1

diff --git a/includes/htmlform/OOUIHTMLForm.php 
b/includes/htmlform/OOUIHTMLForm.php
index 6650321..ed99802 100644
--- a/includes/htmlform/OOUIHTMLForm.php
+++ b/includes/htmlform/OOUIHTMLForm.php
@@ -191,6 +191,10 @@
         * @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.' );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/358507
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dcb9bd51ad0cecbdab868fed056b4077d1c9fa8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.4
Gerrit-Owner: Ladsgroup <ladsgr...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to