r93160 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93159‎ | r93160 | r93161 >
Date:03:07, 26 July 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added fix for incorrect display when value is null
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_TextAreaWithAutocompleteInput.php
@@ -93,6 +93,11 @@
9494 $textarea_attrs['onKeyDown'] = $maxLengthJSCheck;
9595 $textarea_attrs['onKeyUp'] = $maxLengthJSCheck;
9696 }
 97+ // Bug in Xml::element()? It doesn't close the textarea tag
 98+ // properly if the text inside is null - set it to '' instead.
 99+ if ( is_null( $cur_value ) ) {
 100+ $cur_value = '';
 101+ }
97102 $textarea_input = Xml::element( 'textarea', $textarea_attrs, $cur_value, false );
98103 $text .= $textarea_input;
99104