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

File /core/modules/file/file.module

Line 70: Unused local variable $file_path
Line 563: Unused local variable $name
Line 1338: Unused local variable $file_link
Line 1424: Unused local variable $key
Line 1401: Unused local variable $key

Comments

legolasbo’s picture

Assigned: legolasbo » Unassigned
Status: Active » Needs review
StatusFileSize
new818 bytes

Removed the unused local variables.

The following variables were removed already:

Line 1338: Unused local variable $file_link
Line 1424: Unused local variable $key
Line 1401: Unused local variable $key

phiit’s picture

Applied the patch and fixed the two unused $key variables as it seems like you might have missed them.

Unused local variable $file_link still lingers with PHPStorm, but it seems like it's been used, maybe the IDE just doesn't understand it?

chx’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the patch, this looks good.

webchick’s picture

Component: other » file.module
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

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