Part of meta-issue #2002650: [meta, no patch] improve maintainability by removing unused local variables

File /core/modules/file/file.field.inc

Line 243: Unused local variable $delta
Line 252: Unused local variable $delta
Line 556: Unused local variable $delta
Line 565: Unused local variable $new_value
Line 644: Unused local variable $key
Line 812: Unused local variable $delta

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

legolasbo’s picture

Assigned: legolasbo » Unassigned
Status: Active » Needs review
FileSize
2.57 KB

Removed unused local variables and cleaned up some unused code.

Line 556: Unused local variable $delta
Is used in current 8.x-dev

Line 565: Unused local variable $new_value
Was unused and actually part of an else that would never be called since $submitted_value['fids'] is also an array if only a single file was uploaded.

phiit’s picture

Status: Needs review » Reviewed & tested by the community

Applied the patch and looks good to me. Thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

webchick’s picture

Component: other » file.module

Automatically closed -- issue fixed for 2 weeks with no activity.