Commit e2466dae authored by Dries's avatar Dries

- Patch #1065020 by Berdir: fixed E_STRICT warning when downloading/viewing a file or image.

parent 9ee9817d
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment