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/relationship/GroupwiseMax.php
Line 222: Unused local variable $base_field
Comment | File | Size | Author |
---|---|---|---|
#3 | core-remove-unused-vars-2072595-3.patch | 779 bytes | legolasbo |
#1 | core-remove-unused-vars-groupwisemax.php-2072595-1.patch | 735 bytes | legolasbo |
Comments
Comment #1
legolasboRemoved unused variable
Comment #2
phiit CreditAttribution: phiit commentedReviewed, this patch fixes unused variable $base_field but after cleanup leaves another unused variable $views_data which was used only in $base_field.
Comment #3
legolasboAttached patch also removes $views-data.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedThe patch in #3 still applies OK however I am unsure as to whether
$base_field
should actually be used or not. Here's the code:...perhaps in this line somewhere:
If not then the patch is good to go as far as I can see.
Comment #5
boran CreditAttribution: boran commented#3 is fine:
- makes sense
- patch applies cleanly
- Comment #4: $base_field is not used, although the words base and field do appear :-)
- views continues working
Comment #6
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