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/views/lib/Drupal/views/Plugin/views/HandlerBase.php
Line 93: Unused local variable $display_id
Line 112: Unused local variable $display_id
Line 334: Unused local variable $types
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal-remove-unused-local-variable-2067547-8.patch | 755 bytes | sandergo90 |
#1 | unused-local-variables-2067547-1.patch | 1.39 KB | jlindsey15 |
Comments
Comment #1
jlindsey15 CreditAttribution: jlindsey15 commentedComment #2
phiit CreditAttribution: phiit commentedApplied the patch and everything seems to be in order.
Comment #3
phiit CreditAttribution: phiit commentedHaving seconds thoughts, looks to me as the patch is removing some functionality. Someone else needs to look at this as well. :)
If this condition in the code is useless then everything would seem fine in my eyes.
Comment #4
benjy CreditAttribution: benjy commentedEverything looks fine in the current patch. Just one thing:
Maybe here we should initiate $group_types to an empty array?
Comment #5
webchickI must've somehow committed this in my last commit spree.
Committed and pushed to 8.x.
Comment #6
tstoecklerThis in fact removes the only usage of $plural, so $plural is now an unnused local variable.
Comment #7
sandergo90 CreditAttribution: sandergo90 commentedWrote a new patch because the other patch is already committed in 8.x branch. This patch removes plural definition because it's unused in the init() function.
Comment #8
sandergo90 CreditAttribution: sandergo90 commentedComment #9
oriol_e9gComment #10
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