Just detected this small issue while enabling entity translation on a media field.

If there is a reference to a no more existent entity (at least file_load() returns FALSE), the method _media_filter_add_file_usage_from_fields() fails due to an uncheckd $file against stdClass before calling file_usage_add() which casues a PHP Error.

CommentFileSizeAuthor
media_file_usage_check.diff689 bytesLukyLuke_ch

Comments

Status: Needs review » Needs work

The last submitted patch, media_file_usage_check.diff, failed testing.

dave reid’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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