diff --git a/modules/file/file.module b/modules/file/file.module index 638beb2..64d71de 100644 --- a/modules/file/file.module +++ b/modules/file/file.module @@ -172,11 +172,13 @@ function file_file_download($uri, $field_type = 'file') { if ($entity) { // We have to iterate over all languages to get the file that // can be linked to a language other than the default. - foreach($entity->{$field_name} as $item) { - // Find the field item with the matching URI. - if ($item['uri'] == $uri) { - $field_item = $item; - break; + foreach($entity->{$field_name} as $items) { + // Find the field item with the matching URI over all items. + foreach($items as $item) { + if ($item['uri'] == $uri) { + $field_item = $item; + break; + } } } }