The PHP warning is thrown on sites/all/modules/filefield/filefield.module on line 603.

* It will only happen if the node does not have an existing uploaded file.
* The file field must be required.

I think an is_array() wrapper is more appropriate than having the module keep invalid/empty field values around for later reference.

I'd be interested to know if there's a more precise but still minimally invasive solution.

Thanks.

CommentFileSizeAuthor
filefield.module.patch820 bytessmithda5

Comments

cghobbs’s picture

I was having the same issue and I tried applying the patch. The error message is gone, but the image still isn't being uploaded. It returns with this error message: "Bulletin is required. Please upload a file."

cghobbs’s picture

I realized it was due to a max file size issue which is easy to fix. However, I think that there should be proper error reporting for this. i.e. "Max File Upload Size Exceeded."

ellanylea’s picture

I'm having the same error, and the patch hasn't helped. Did you fix the max file size via the Upload module?

dopry’s picture

Status: Needs review » Fixed

This should be fixed in the head of the DRUPAL-5--2 branch... I found a cleaner way to do the counting as well you can check out smithda5.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.