r104462 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104461‎ | r104462 | r104463 >
Date:17:58, 28 November 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r102365 - standardized $cur_value by setting it to blank if it's null, for newly-strict checks
Modified paths:
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_DropdownInput.php (modified) (history)
  • /trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/forminputs/SF_RadioButtonInput.php
@@ -19,6 +19,9 @@
2020 public static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
2121 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
2222
 23+ // Standardize $cur_value
 24+ if ( is_null( $cur_value ) ) { $cur_value = ''; }
 25+
2326 if ( ( $possible_values = $other_args['possible_values'] ) == null ) {
2427 // If it's a Boolean property, display 'Yes' and 'No'
2528 // as the values.
Index: trunk/extensions/SemanticForms/includes/forminputs/SF_DropdownInput.php
@@ -29,6 +29,9 @@
3030 public static function getHTML( $cur_value, $input_name, $is_mandatory, $is_disabled, $other_args ) {
3131 global $sfgTabIndex, $sfgFieldNum, $sfgShowOnSelect;
3232
 33+ // Standardize $cur_value
 34+ if ( is_null( $cur_value ) ) { $cur_value = ''; }
 35+
3336 $className = ( $is_mandatory ) ? 'mandatoryField' : 'createboxInput';
3437 if ( array_key_exists( 'class', $other_args ) ) {
3538 $className .= ' ' . $other_args['class'];

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102365strict comparators for empty stringsjeroendedauw02:25, 8 November 2011