Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | core-remove-unused-vars-file.field_.inc-2072551-1.patch | 2.57 KB | legolasbo |
Comments
Comment #1
legolasboRemoved 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.
Comment #2
phiit CreditAttribution: phiit commentedApplied the patch and looks good to me. Thanks!
Comment #3
webchickCommitted and pushed to 8.x. Thanks!
Comment #4
webchick