If an image field is not required, and a page is submitted where it isn't used, then Drupal will throw an error. The fix is from the following thread and works perfectly for me.

From http://drupal.org/node/63321

Change field_image.inc:48
from this:

 $node->$fieldname->smallpath = flexinode_field_image_make_smaller($node->$fieldname->filepath, '_sm', $field->options[2]);
 $node->$fieldname->thumbpath = flexinode_field_image_make_smaller($node->$fieldname->filepath, '_th', $field->options[3]); 

to this:

 if (is_object($node->$fieldname)) {
 $node->$fieldname->smallpath = flexinode_field_image_make_smaller($node->$fieldname->filepath, '_sm', $field->options[2]);
 $node->$fieldname->thumbpath = flexinode_field_image_make_smaller($node->$fieldname->filepath, '_th', $field->options[3]);
 }

Comments

Bèr Kessels’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

Please make a real patch: http://drupal.org/diffandpatch

Bèr Kessels’s picture

Status: Needs work » Closed (duplicate)