Commit 7efe917d authored by webchick's avatar webchick
Browse files

Issue #2081201 by mrsinguyen: Remove Unused local variable from...

Issue #2081201 by mrsinguyen: Remove Unused local variable  from /core/modules/file/lib/Drupal/file/Plugin/field/formatter/FileFormatterBase.php.
parent e246af9e
......@@ -21,7 +21,7 @@ public function prepareView(array $entities, $langcode, array $items) {
// Remove files specified to not be displayed.
$fids = array();
foreach ($entities as $id => $entity) {
foreach ($items[$id] as $delta => $item) {
foreach ($items[$id] as $item) {
if ($this->isDisplayed($item) && !empty($item->target_id)) {
// Load the files from the files table.
$fids[] = $item->target_id;
......@@ -33,7 +33,7 @@ public function prepareView(array $entities, $langcode, array $items) {
$files = file_load_multiple($fids);
foreach ($entities as $id => $entity) {
foreach ($items[$id] as $delta => $item) {
foreach ($items[$id] as $item) {
// If the file does not exist, mark the entire item as empty.
if (!empty($item->target_id)) {
$item->entity = isset($files[$item->target_id]) ? $files[$item->target_id] : NULL;
......
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