form_builder() doesn't validate children type when recursing through all child elements, which leads to error on form save attempt (i.e. not well ported 5.x modules)
this small patch fixes this behaviour

CommentFileSizeAuthor
#6 form.inc_.patch542 bytesvalthebald
form.inc_.patch447 bytesvalthebald

Comments

Freso’s picture

Does the problem exist in 7.x (latest HEAD)? Which version is the patch for that needs porting?

valthebald’s picture

this problem exists in both 6.2 and HEAD branches
sorry for being late in answer - is there any way to get notifications here?

Freso’s picture

Version: 6.2 » 7.x-dev

You can go to http://drupal.org/project/issues/subscribe-mail/drupal and choose "Own issues".

valthebald’s picture

great! thanks

gpk’s picture

Status: Patch (to be ported) » Needs work

You'll need to re-arrange your added line slightly per http://drupal.org/coding-standards. Also a test will probably be required ...

valthebald’s picture

StatusFileSize
new542 bytes

adapted patch for drupal coding standard (I hope...)

valthebald’s picture

Status: Needs work » Needs review
gpk’s picture

That looks better. Probably needs a test to confirm that the problem is fixed, see http://drupal.org/node/273612.

Freso’s picture

Status: Needs review » Needs work

I know this is really annoying, but you've used tabs instead of (two) spaces for indentation. Coding style looks good apart from this. :)

chx’s picture

Status: Needs work » Closed (won't fix)

I am steadfast in that these kind of fixes are bloat and nothing else. You add lines of code to Drupal core which never will fire unless you are developing and doing it wrong. But, it will take memory and because of parsing it, some CPU cycles on every site that runs Drupal. That's sheer wrong.