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/locale/locale.pages.inc
Line 493: Unused local variable $project_id
Line 638: Unused local variable $id
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-core-remove-unused-local-variable-2080449.patch | 676 bytes | mrsinguyen |
Comments
Comment #1
mrsinguyen CreditAttribution: mrsinguyen commentedAttached patch.
Comment #2
boran CreditAttribution: boran commentedThe patch is a one liner, and looks good:
- grepped to look for $project_id, it is used in just one place in that file (i.e. limited to the scope of one function).
- its is set but never used.
- The patch applies cleanly and the variable is effectively removed.
- The sample website does not fall over.
Comment #3
alexpottCommitted a34cb25 and pushed to 8.x. Thanks!
Committed as part of a merged commit for #2002650: [meta, no patch] improve maintainability by removing unused local variables