From 6585b865c11af6439d120edce297ab1ad2f4ee6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 10 Aug 2016 21:40:40 +0200 Subject: [PATCH] HTMLFormField: Don't display empty popup in OOUI mode if empty 'help' is given Change-Id: I1aa68dcb9cdf1584f65436a641b119f0d61537ef --- includes/htmlform/HTMLFormField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index 8f42ea2c74..d48e407006 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -606,7 +606,7 @@ abstract class HTMLFormField { } $fieldType = get_class( $this ); - $helpText = $this->getHelpText(); + $help = $this->getHelpText(); $errors = $this->getErrorsRaw( $value ); foreach ( $errors as &$error ) { $error = new OOUI\HtmlSnippet( $error ); @@ -620,7 +620,7 @@ abstract class HTMLFormField { $config = [ 'classes' => [ "mw-htmlform-field-$fieldType", $this->mClass ], 'align' => $this->getLabelAlignOOUI(), - 'help' => $helpText !== null ? new OOUI\HtmlSnippet( $helpText ) : null, + 'help' => ( $help !== null && $help !== '' ) ? new OOUI\HtmlSnippet( $help ) : null, 'errors' => $errors, 'notices' => $notices, 'infusable' => $infusable, -- 2.20.1