The module contains this code

/**
 * Implementation of hook_nodeapi().
 */
function filefield_paths_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {

  switch ($op) {
    case 'presave':
      if (module_exists('content')) {
        $content_type = content_types($node->type);

        foreach ($content_type['fields'] as $field) {
          if ($field['type'] == 'filefield' && is_array($node->$field['field_name'])) {

The foreach can produce an error if $content_type['fields'] is not set which happens for any content type without CCK fields. I discovered this for a content type where the body was not used and there where no CCK fields.

Comments

Deciphered’s picture

Hi nevets,

While I am unable to reproduce the issue, I am aware of the cause of the issue and should have no issue fixing it, but I would still like to reproduce the issue to be certain.

At this stage I'm guessing that the reason you are getting the error and I am not is due to the server environment, and more specifically it's likely to be the version of PHP. Can you let me know what version of PHP you are running and any other information that may be helpful.

Cheers,
Deciphered.

nevets’s picture

PHP 5.2.6

Windows XP

Apache

display_errors set to E_ALL

Deciphered’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

No longer supporting Drupal 6 issues for this module.