Skip to content
Snippets Groups Projects
Commit e2466dae authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent 9ee9817d
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment