Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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
Comment #1
Deciphered CreditAttribution: Deciphered commentedHi 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.
Comment #2
nevets CreditAttribution: nevets commentedPHP 5.2.6
Windows XP
Apache
display_errors set to E_ALL
Comment #3
Deciphered CreditAttribution: Deciphered commentedNo longer supporting Drupal 6 issues for this module.