Index: multistep.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/multistep/multistep.module,v
retrieving revision 1.1.2.2.2.33
diff -u -p -r1.1.2.2.2.33 multistep.module
--- multistep.module	14 Dec 2009 20:31:49 -0000	1.1.2.2.2.33
+++ multistep.module	3 Feb 2010 10:24:39 -0000
@@ -160,7 +160,7 @@ function multistep_field_access($op, $fi
       $group = _fieldgroup_field_get_group($type, $field['field_name']);
       $groups = fieldgroup_groups($type);
       // Set #access to FALSE if the current field does not belong in the current step.
-      if ($field['widget']['multistep'] != $step && !$groups[$group]) {
+      if (isset($field['widget']['multistep']) && $field['widget']['multistep'] != $step && !$groups[$group]) {
         return FALSE;
       }
       // Set #access to FALSE if the current field's group does not belong in the current step.
@@ -367,11 +367,12 @@ function multistep_widget_settings_alter
  * This is the node-editing form.
  */
 function multistep_form_alter(&$form, &$form_state, $form_id) {
-  $type = $form['#node']->type;
+  if (substr_count($form_id, 'node_form') <= 0 || arg(0) == 'admin') {
+    return;
+  }
   // Do nothing if multistep is not enabled for this node type.
-  if (variable_get('multistep_expose_' . $type, 'disabled') != 'enabled'
-  || substr_count($form_id, 'node_form') <= 0
-  || arg(0) == 'admin') {
+  $type = $form['#node']->type;
+  if (variable_get('multistep_expose_' . $type, 'disabled') != 'enabled') {
     return;
   }
   // Disable immediate redirection through "destination" parameter, but preserve the destination value.
@@ -779,7 +780,9 @@ function _multistep_reset_data($type) {
 function _multistep_get_status($nid, $step) {
   $status = NULL;
   if ($nid != NULL && $step != NULL && $step > 0) {
-    $status = db_fetch_object(db_query('SELECT status FROM {multistep} WHERE nid = %d AND step = %d', $nid, $step))->status;
+    if ($row = db_fetch_object(db_query('SELECT status FROM {multistep} WHERE nid = %d AND step = %d', $nid, $step))) {
+      $status = $row->status;
+    }
   }
   return $status;
 }
@@ -803,7 +806,7 @@ function _multistep_is_complete(&$form_s
  */
 function _multistep_will_complete(&$form_state, $current_step) {
   // Return FALSE if some other module is setting the step as unsubmitted
-  $override = module_invoke_all('multistep_update_status', $form_state, $status, $current_step);
+  $override = module_invoke_all('multistep_update_status', $form_state, $current_step);
   foreach ($override as $status) {
     if ($status != 'submitted') {
       return FALSE;
