Closed (works as designed)
Project:
Drupal core
Version:
7.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jul 2011 at 17:09 UTC
Updated:
11 Aug 2023 at 12:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
vgoodvin commentedSame patch for D7.
Comment #2
chx commentedIn general, we are accepting now checks to avoid teapot error messages like #1283892: Let Render API fail in a tale-telling way on invalid $element but this needs a test and a better explanation because this does not sound such kind of error.
Comment #3
rosk0Fixed patch.
Comment #4
gbirch commentedThe patch should also check that the value is a string so as to prevent deprecation notices when NULL is passed to mb_strlen() by drupal_strlen().
Comment #5
poker10 commentedI would say that the problem mentioned in the IS can happen only if there is a field with
#maxlengthattribute, which expects an array (for example theselectform element). However according to the Form API documentation,#maxlengthis only allowed on these elements:machine_name,password,textfield. I do not think either of them could have a value of array. Therefore this is likely a programming error, which is not something the Drupal 7 core should sanitize.I am closing this as Works as designed. If someone can provide steps to reproduce which will work on the clean D7 install according to the Form API docs, then feel free to reopen this. Thanks!