Closed (fixed)
Project:
Drupal core
Version:
6.4
Component:
user system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2008 at 12:21 UTC
Updated:
21 Jan 2009 at 22:30 UTC
I've just been working on a patch to refactor access rules into a separate module and spent about an hour trying to work out why I'd broken admin/user/user/create to cause a WSOD on form submission.
Turns out it's broken in HEAD...
Getting array to string conversion in includes/form.inc on line 670.
Comments
Comment #1
floretan commentedThe cause of the problem is that _form_validate() gets called before password_confirm_validate(), but this second function is the one where form_set_value() is called to change the structure of form elements of type password_confirm from an array
to a string
In this case we actually want the element-specific validation to be called before the generic validation for required fields, or add a flag to indicate that certain elements handle their own "#required" validation.
With the possibility of having fields in core, there will probably be more composite form elements like this, so a general solution would be a better time investment than making a special case for elements of type password_confirm
Comment #2
catchpwolanin kindly directed me to the original issue for this, which was fixed in 6.x but not committed to HEAD yet: http://drupal.org/node/11774
Sorry for the duplicate (and thanks flobruit - if you have ideas about a more generic solution I'm sure that'd worth pursuing).
Comment #3
nonsieThis is broken in 6.4 resulting in warning: mb_strlen() expects parameter 1 to be string, array given in C:\xampp\htdocs\drupal64\includes\unicode.inc on line 404.
Here's a related thread - http://drupal.org/node/289800
The link in #2 links to a theming overview node - I'd love to find out what the solution to this bug was
Comment #4
catch#2 is the wrong link, at the moment I can't find what the correct link ought to be.
Comment #5
gábor hojtsyWould be great to find out. Is this still an issue in 6.8?
Comment #6
catchI don't think so - nonsie's bug has it's own issue, so closing this one out.
Comment #7
nonsieI believe it's still broken in 6.8 (don't have a clean copy atm to verify). I've modified my local copy replacing
with
and this seems to do the trick. Since I can't find the original issue in #2 I'm not sure how it was previously fixed.
Comment #8
damien tournoud commentedThe good issue for #2 is #117748: Trim required fields on validate: we added a drupal_strlen() check there, that what caused the ordering issue to appear in plain light.
#289800: Error on user creation - warning: mb_strlen() expects parameter 1 to be string, array given seems more on focus, so let's continue in there.