r87184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87183‎ | r87184 | r87185 >
Date:13:17, 1 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fix to handle default value of '0'
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -795,7 +795,7 @@
796796 }
797797
798798 if ( empty( $cur_value ) && !$form_submitted ) {
799 - if ( $default_value ) {
 799+ if ( !is_null( $default_value ) ) {
800800 // Set to the default value specified in the form, if it's there.
801801 $cur_value = $default_value;
802802 } elseif ( $preload_page ) {