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/user/lib/Drupal/user/Plugin/views/field/Language.php
Line 23: Unused local variable $uid
Comment | File | Size | Author |
---|---|---|---|
#2 | remove_unused_variable_uid-2080591-7825202.patch | 634 bytes | beowulf1416 |
Comments
Comment #1
mrsinguyen CreditAttribution: mrsinguyen commentedLine 23: I see the $uid still use.
Comment #2
beowulf1416 CreditAttribution: beowulf1416 commentedfirst attempt
Comment #3
rhm5000 CreditAttribution: rhm5000 commented@mrsinguyen Actually $uid variable before the conditional is unused because $uid is re-declared inside the conditional which is the $uid being used. Also $uid is only being used within the conditional's scope, so removing the one outside is correct.
Patch applies and unused $uid is removed.
Comment #4
alexpottCommitted 0acc459 and pushed to 8.x. Thanks!