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/config/lib/Drupal/config/Tests/ConfigImportUITest.php
Line 41: Unused local variable $storage
Line 123: Unused local variable $active
Comment | File | Size | Author |
---|---|---|---|
#8 | 2080717-remove-unused-variables-8.patch | 1003 bytes | TR |
#4 | 2080717-4.patch | 1.45 KB | areke |
#1 | 2080717-remove-unused-variables.patch | 994 bytes | chertzog |
Comments
Comment #1
chertzogComment #2
enhdless CreditAttribution: enhdless commentedTried this patch, but the result is "patch does not apply"
Comment #3
areke CreditAttribution: areke commentedComment #4
areke CreditAttribution: areke commentedRe-rolled.
Comment #5
deneo2 CreditAttribution: deneo2 commentedThe patch applies fine and solve the issue correctly. Good job!
Comment #6
TR CreditAttribution: TR commented1: 2080717-remove-unused-variables.patch queued for re-testing.
What's wrong with the first patch? It removes the entire line for each variable. The second patch just removes the variable but still performs a useless get() where the results aren't saved.
Comment #8
TR CreditAttribution: TR commentedI rebased the patch from #1 so that it applied to the current HEAD.
The patch from #4 is just wrong.
Comment #9
TR CreditAttribution: TR commentedComment #10
areke CreditAttribution: areke commentedSorry about that. Anyways, this applies and looks good. Thank you!
Comment #11
webchickCommitted and pushed to 8.x. Thanks!