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.
Problem/Motivation
Various methods in ContactForm use $this->get() and $this->set() to get and set protected properties.
Proposed resolution
Just set the properties direct
- return $this->get('recipients');
+ $this->recipients;
- $this->set('recipients', $recipients);
+ $this->recipients = $recipients;
Remaining tasks
Do it
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#3 | fix_use_of_get_and-2343787-3.patch | 1.35 KB | tim-e |
#1 | fix_use_of_get_and-2343787-1.patch | 1.25 KB | tim-e |
Comments
Comment #1
tim-e CreditAttribution: tim-e commentedComment #2
larowlanstill needs the return $this
Comment #3
tim-e CreditAttribution: tim-e commentedComment #4
larowlanlooks good, rtbc unless bot disagrees
Comment #6
catchCommitted/pushed to 8.0.x, thanks!