entity_metadata_delete_file() currently doesn't check if the passed $fid is valid.

node_delete() for example, does this check (i.e. in node_delete_multiple() it iterates over the loaded nodes)

Patch will follow.

Comments

amitaibu’s picture

Status: Active » Needs review
StatusFileSize
new566 bytes
amitaibu’s picture

Title: Prevent WSOD if file doesn't load » Prevent WSOD if file doesn't load on file-delete

Better title

mile23’s picture

StatusFileSize
new1.7 KB

@Amitaibu: I made a regression test and reversed the logic for one less binary decision.

Status: Needs review » Needs work

The last submitted patch, entity_1972668_3.patch, failed testing.

mile23’s picture

StatusFileSize
new1.69 KB

Woops wrong test.

mile23’s picture

Status: Needs work » Needs review
chris matthews’s picture

Assigned: amitaibu » Unassigned
Issue summary: View changes

The 6 year old patch in #5 to callbacks.inc applied cleanly to the latest entity 7.x-1.x-dev, but still needs review.