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.
See meta #2002650: [meta, no patch] improve maintainability by removing unused local variables
core/includes/authorize.inc, line numbers identified below.
- Unused local variable $base_url (18)
- Unused local variable $base_url (229)
Comment | File | Size | Author |
---|---|---|---|
#2 | 2002706-2-remove_unused_variables.patch | 694 bytes | kerasai |
Comments
Comment #1
kerasai CreditAttribution: kerasai commentedComment #2
kerasai CreditAttribution: kerasai commentedPatch attached.
Comment #3
YesCT CreditAttribution: YesCT commentedthis looks good. within scope and nothing tricky.
rtbc if testbot says ok.
Comment #5
neochief CreditAttribution: neochief commentedDude, please update the task on drupalofficehours if you taken task from there.
Comment #6
kerasai CreditAttribution: kerasai commented#2: 2002706-2-remove_unused_variables.patch queued for re-testing.
Comment #8
jthorson CreditAttribution: jthorson commentedPatch segfaulted apache on the testbot. Without investigating further, I'm not sure if it was the patch or the bot's fault.
Comment #9
kerasai CreditAttribution: kerasai commented#2: 2002706-2-remove_unused_variables.patch queued for re-testing.
Comment #10
kerasai CreditAttribution: kerasai commentedFirst time through it passed all tests except for Drupal\system\Tests\Form\RedirectTest, second time looks like environment choked on setup. This is a simple edit, and should clearly not cause any errors or changes to the operation of the functions.
Giving it one more shot through the testbot, will also manually conduct tests to see if this edit impacts behavior.
Comment #11
aspilicious CreditAttribution: aspilicious commentedThis should be ok :)
Comment #12
alexpottFixed title as this is not a big performance win.. but unused variables are a code maintainability issue... 2 less lines of code to maintain!
Committed 6455242 and pushed to 8.x. Thanks!