r112124 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112123‎ | r112124 | r112125 >
Date:17:54, 22 February 2012
Author:yaron
Status:deferred
Tags:
Comment:
Replaced empty() call with comparison to blank, for case of value of '0'
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -903,7 +903,7 @@
904904 } elseif ( array_key_exists( $field_name, $template_instance_query_values ) ) {
905905 $field_query_val = $template_instance_query_values[$field_name];
906906 }
907 - if ( $form_submitted || ( ! empty( $field_query_val ) && ! is_array( $field_query_val ) ) ) {
 907+ if ( $form_submitted || ( $field_query_val != '' && ! is_array( $field_query_val ) ) ) {
908908 $cur_value = $field_query_val;
909909 }
910910 }