The loading of field data should emulate file_field_load(), which sets the item value to NULL if a file fails to load. The current behavior will cause the FALSE returned from file_load() to be casted to array(FALSE) which messes up file field formatters.

CommentFileSizeAuthor
#2 2774857-do-not-cast-unloaded-files.patch877 bytesDave Reid
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid created an issue. See original summary.

Dave Reid’s picture

Status: Active » Needs review
FileSize
877 bytes

  • Sneakyvv committed bf833a3 on 7.x-1.x authored by Dave Reid
    Issue #2774857 by Dave Reid: If a file fails to load, the item value...
Sneakyvv’s picture

Status: Needs review » Fixed

Seems a valid point. The code looks good, so I've committed it to dev. Thanks for the patch!

Status: Fixed » Closed (fixed)

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