Index: decisions.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/decisions/decisions.module,v retrieving revision 1.227 diff -u -p -r1.227 decisions.module --- decisions.module 4 Feb 2010 17:32:54 -0000 1.227 +++ decisions.module 5 Feb 2010 15:54:18 -0000 @@ -1539,7 +1539,7 @@ function decisions_form(&$node, &$form_s $form['settings']['randomize'] = array( '#type' => 'checkbox', '#title' => t('Randomize answers order'), - '#default_value' => $node->randomize, + '#default_value' => isset($node->randomize) ? $node->randomize : FALSE, '#description' => t('Display answers in a random order each time the poll is displayed.'), ); @@ -1550,8 +1550,8 @@ function decisions_form(&$node, &$form_s '#collapsible' => TRUE, ); - $startdate = !is_null($node->startdate) ? $node->startdate : time(); - $runtime = !is_null($node->runtime) ? $node->runtime : variable_get('decisions_default_runtime', 24 * 60 * 60); + $startdate = isset($node->startdate) ? $node->startdate : time(); + $runtime = isset($node->runtime) ? $node->runtime : variable_get('decisions_default_runtime', 24 * 60 * 60); if ($runtime == DECISIONS_RUNTIME_INFINITY) { // by default $enddate = $startdate; @@ -1598,7 +1598,7 @@ function decisions_form(&$node, &$form_s '#type' => 'textfield', '#size' => 10, '#title' => t('Number'), - '#default_value' => ($node->quorum_abs ? $node->quorum_abs : 0), + '#default_value' => isset($node->quorum_abs) ? $node->quorum_abs : 0, '#required' => TRUE, '#description' => t('Minimum number of voters required to cast their ballot for this decision to be valid, in addition to the percentage.'), ); @@ -1607,7 +1607,7 @@ function decisions_form(&$node, &$form_s '#type' => 'textfield', '#size' => 10, '#title' => t('Percentage (%)'), - '#default_value' => ($node->quorum_percent ? $node->quorum_percent : 0), + '#default_value' => isset($node->quorum_percent) ? $node->quorum_percent : 0, '#required' => TRUE, '#description' => t('Minimum numbers of voters required for this decision to be valid, expressed as a percentage of the eligible voters rounded up.'), '#weight' => -1,