Index: draft.module =================================================================== --- draft.module (revision 109) +++ draft.module (working copy) @@ -560,22 +560,24 @@ $fields = array('' => t('Select One')); if (!is_null($node_type)) { $cfields = content_types($node_type); - // Traverse the fields so we can retrieve the information - foreach ($cfields['fields'] as $k => $v) { - if (isset($v['widget']['label'])) { - $fields[$k] = $v['widget']['label']; - } - else { - $fields[$k] = $k; + if (is_array($cfields['fields'])) { + // Traverse the fields so we can retrieve the information + foreach ($cfields['fields'] as $k => $v) { + if (isset($v['widget']['label'])) { + $fields[$k] = $v['widget']['label']; + } else { + $fields[$k] = $k; + } } } - // Traverse the Extra portion inside the node type - foreach ($cfields['extra'] as $k => $v) { - if (isset($v['label'])) { - $fields[$k] = $v['label']; - } - else { - $fields[$k] = $k; + if (is_array($cfields['extra'])) { + // Traverse the Extra portion inside the node type + foreach ($cfields['extra'] as $k => $v) { + if (isset($v['label'])) { + $fields[$k] = $v['label']; + } else { + $fields[$k] = $k; + } } } }