Index: multistep.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/multistep/multistep.module,v
retrieving revision 1.1.2.2.2.41
diff -u -p -r1.1.2.2.2.41 multistep.module
--- multistep.module	20 Jul 2010 00:31:09 -0000	1.1.2.2.2.41
+++ multistep.module	27 Jul 2010 14:17:25 -0000
@@ -131,6 +131,7 @@ function _multistep_block($type) {
   if (arg(0) == 'node') {
     $node_type = '';
     $new = FALSE;
+    $body = '';
     if (is_numeric(arg(1)) && arg(2) == 'edit') {
       $node_type = node_load(arg(1))->type;
     }
@@ -222,20 +223,24 @@ function multistep_fieldgroup_form(&$for
  * Restrict access to fields that do not belong in the current step.
  */
 function multistep_field_access($op, $field) {
-  $type = $field['type_name'];
-  // Do nothing if multistep is not enabled for this node type.
-  if (variable_get('multistep_expose_' . $type, 'disabled') != 'enabled') {
-    return;
-  }
+if (arg(0) == 'node') {
   switch ($op) {
     case 'edit':
-      $step = _multistep_get_current_step($type);
+
+      if (!isset($field['type_name'])) {
+        return;
+      }
+      // Do nothing if multistep is not enabled for this node type.
+      if (variable_get('multistep_expose_' . $field['type_name'], 'disabled') != 'enabled') {
+        return;
+      }
+      $step = _multistep_get_current_step($field['type_name']);
       // Render all steps if requested by a user with "toggle multistep" permissions.
       if ($step == 0 && user_access('toggle multistep')) {
         return;
       }
-      $group = _fieldgroup_field_get_group($type, $field['field_name']);
-      $groups = fieldgroup_groups($type);
+      $group = _fieldgroup_field_get_group($field['type_name'], $field['field_name']);
+      $groups = fieldgroup_groups($field['type_name']);
       // Return if the current field belongs in every step
       if (isset($field['widget']['multistep']) && $field['widget']['multistep'] == 0 && !$groups[$group]) {
         return;
@@ -253,6 +258,7 @@ function multistep_field_access($op, $fi
         return FALSE;
       }
   }
+ }
 }
 
 /**
@@ -953,7 +959,7 @@ function _multistep_will_complete(&$form
     // If it's complete, submitting the current step will keep it complete.
     return TRUE;
   }
-  elseif (count($unsubmitted) == 1 && $unsubmitted[$current_step] == $current_step) {
+  elseif (isset($unsubmitted[$current_step]) && count($unsubmitted) == 1 && $unsubmitted[$current_step] == $current_step) {
     // If the current step is the only one left, submitting it will complete the form.
     return TRUE;
   }
