Hi,

I see there are several bugreports there with the following error message:

warning: Illegal offset type in includes/form.inc on line 1358.

The problem is that the Forms API's _element_info($type, $refresh = NULL) $type parameter sometimes is an array instead of string. I did a 2 line fix, it cures the problem and i haven't noticed a side effect.

CommentFileSizeAuthor
illegal_offset_1358.patch333 bytesaries

Comments

mr.baileys’s picture

Version: 6.8 » 6.x-dev
Category: bug » feature
Status: Needs review » Closed (won't fix)

Errors like "... illegal offset ... in includes/form.inc on line ..." are almost always caused by broken code elsewhere. In this case, the $type parameter that is passed to _element_info is either hardcoded (used once in core to set it to 'select', or populated from the '#type' value on a form element.

If people set '#type' to something else than a string (or possibly if they leave it empty), then things will break with the error you indicate. However, I think the general consensus is that core is not patched to prevent these errors, as the faulty code itself should be fixed. This is refered to as "not babysitting broken code"...

Setting this to "won't fix" because of that reason. Also marking this as a feature request ("add code to ignore faulty input") instead of a bug.

quietone’s picture