summaryrefslogtreecommitdiff
path: root/modules/file/file.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/file/file.module')
-rw-r--r--modules/file/file.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/file/file.module b/modules/file/file.module
index 224a08a4d..400270178 100644
--- a/modules/file/file.module
+++ b/modules/file/file.module
@@ -160,7 +160,8 @@ function file_file_download($uri, $field_type = 'file') {
foreach ($field_references as $entity_type => $type_references) {
foreach ($type_references as $id => $reference) {
// Try to load $entity and $field.
- $entity = reset(entity_load($entity_type, array($id)));
+ $entity = entity_load($entity_type, array($id));
+ $entity = reset($entity);
$field = NULL;
if ($entity) {
// Load all fields for that entity.