Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/358349 )
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/49/358349/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/358349
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: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits