file_get_file_reference_count() seems severely broken, and doesn't account correctly for files used in several instance bundles.

For a start, there is a test on $file->file_field_type == $entity_type, *after* the loop that iterates over $entity_type, so the count is completely off depending on the last entity type defined in the loop.

Comments

andypost’s picture

Status: Active » Closed (duplicate)