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.
API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21Fo...
FormValidator::doValidateForm()'s $form_id parameter is only present on the initial call to the method, which receives the entire form array as the $element, and not on recursive calls. This should be documented on the parameter.
Comment | File | Size | Author |
---|---|---|---|
#3 | 3203416-3.patch | 916 bytes | guilhermevp |
Comments
Comment #2
guilhermevp CreditAttribution: guilhermevp at CI&T commentedSending patch, please review!
Comment #3
guilhermevp CreditAttribution: guilhermevp at CI&T commentedUpdated patch fixing grammar error.
Comment #4
hmendes CreditAttribution: hmendes at CI&T commentedPatch from #3 was applied successfully and changed the parameter comment.
Changing it to RTBC.
Comment #5
alexpottSure we can fix this but it'd be great if someone can file a follow-up to remove the use-case. I think it's not necessary. We can check if
$elements[#type]
equalsform
instead of this. Form elements cannot be nested. It also has the advantage of being more semantic - if you're dealing with a form do the form validation path.Comment #6
alexpottCommitted and pushed 52f5af29a8 to 9.3.x and 2c47aaa2b9 to 9.2.x. Thanks!
Backported to 9.2.x as this a docs only patch.