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.
This has been bothering me for a long time (applies to 6.x also), there's a completely unnecessary unset($edit)
right in the middle of _form_builder_handle_input_element(). It's not defined earlier in the function, nor is it a static variable or passed in by reference. It's just a small bit of cruft, supposedly left over from #138706: FormAPI 3: Ready to rock.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal_form_inc_unnecessary_unset.patch | 513 bytes | quicksketch |
Comments
Comment #1
quicksketchAttached.
Comment #2
eaton CreditAttribution: eaton commentedThere's no reason that line should live. Good catch, quicksketch!
Comment #3
webchickConfirmed that $edit is not defined earlier in the function, and testing bot is happy.
It is now dead in HEAD! Thanks. :)
Moving to 6.x.
Comment #4
Gábor HojtsyCommitted to Drupal 6 too!