diff --git a/filefield_paths.module b/filefield_paths.module index 4787b1d..4116def 100644 --- a/filefield_paths.module +++ b/filefield_paths.module @@ -352,7 +352,7 @@ function filefield_paths_node_presave(&$node) { $content_type = content_types($node->type); foreach ($content_type['fields'] as $field) { - if ($field['type'] == 'filefield' && is_array($node->$field['field_name'])) { + if ($field['type'] == 'filefield' && isset($node->$field['field_name']) && is_array($node->$field['field_name'])) { foreach ($node->$field['field_name'] as $count => &$file) { if (!is_array($file) || empty($file['filepath'])) {