46c46
<       if(!$fields[$type]) {
---
>       if(!isset($fields[$type])) {
54,58c54,61
<       $c = cache_get('content:'. $node->nid .':'. $node->vid, content_cache_tablename());
<       cache_clear_all('content:'. $node->nid .':'. $node->vid, content_cache_tablename());
<       module_invoke('content', 'nodeapi', $node, $op, $a3, $a4);
<       $c = cache_set('content:'. $node->nid .':'. $node->vid, content_cache_tablename());
<       
---
> 
>       if(isset( $node->nid)) {
>           $c = cache_get('content:'. $node->nid .':'. $node->vid, content_cache_tablename());
>           cache_clear_all('content:'. $node->nid .':'. $node->vid, content_cache_tablename());
>           module_invoke('content', 'nodeapi', $node, $op, $a3, $a4);
>           $c = cache_set('content:'. $node->nid .':'. $node->vid, content_cache_tablename());
>       }
> 
114c117
<     $display_default = _inherit_get($form['#node_type']->type, 'display') or $display_default = INHERIT_COMBINE_BY_WEIGHT;
---
>     $display_default = _inherit_get($form['#node_type']->type, 'display') or $display_default = INHERIT_BY_WEIGHT;
132c135
<          INHERIT_COMBINE_BY_WEIGHT => t("Combine Elements by Weight"),
---
>          INHERIT_BY_WEIGHT => t("Combine Elements by Weight"),
210c213
<   $family_tree = _inherit_get_data();
---
>   $family_tree = _inherit_get();
213,214c216,217
<     if($parent) {
<       $pt = content_types($parent);
---
>     if($parent && $parent['parent'] != 0) {
>       $pt = content_types($parent['parent']);
