- Patch #1065020 by Berdir: fixed E_STRICT warning when downloading/viewing a file or image.
parent
5e1e44c4c0
commit
c5425cbfba
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue