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/Tests/Handler/FieldWebTest.php
Line 207: Unused local variable $base
Line 208: Unused local variable $absolute_string
Line 232: Unused local variable $expected_result
Line 234: Unused local variable $result
Comment | File | Size | Author |
---|---|---|---|
#4 | drupal-core_remove-unused-variable-2072617-4.patch | 698 bytes | deneo |
#1 | core-remove-unused-vars-fieldwebtest.php-2072617-1.patch | 698 bytes | legolasbo |
Comments
Comment #1
legolasboRemoved unused variables, but left $expected_result and $result untouched even though they are currently unused. The line that uses them has been commented out because of a bug in views.
Comment #2
legolasboComment #3
areke CreditAttribution: areke commentedUnfortunately, the patch no longer applies.
Comment #4
deneo CreditAttribution: deneo commentedI didn't remove $expected_result and $result because in the comments says that aren't used for now because of a bug.
Comment #5
deneo CreditAttribution: deneo commentedComment #6
areke CreditAttribution: areke commentedNot removing the two local variables was the way to go. The patch applies cleanly and addresses the issue correctly. Thank you!
Comment #7
webchickSeems like the comment needs to be removed/updated as well?
Comment #8
xjmPlease merge this (and any other similar cleanups for the Views module) with #2072597: Remove Unused local variables from tests in the Views module.
Comment #9
xjm