When viewing a Forum node and clicking the edit link (Example: node/6/edit), the page loads with no BODY content (blank page) and the log reports the following error:

"Cannot use string offset as an array in [...snip...]/includes/form.inc on line 262"

This is possibly related to other recent form.inc errors and PHP 5.0.5.

Tested using cvs as of today, PHP 5.0.5, MySQL 5.0.15, Apache 2.0.55, IE 6.

CommentFileSizeAuthor
#3 forum_16.patch1.05 KBchx

Comments

Thomas Sewell’s picture

To avoid confusion in different patched versions of form.inc, line 262 for me reads:

    $form[$key]['#tree'] = (isset($form[$key]['#tree'])) ? $form[$key]['#tree'] : $form['#tree'];

Sadly, I don't understand how the arrays are being used well enough to fix it. :)

Thomas Sewell’s picture

Further research indicates that the problem is probably in:

$form['#tree'];

Some checking appears a couple of lines later:

if (!$form['#tree'])

Still trying to figure out what's supposed to happen and what is going on here.

$form['#tree'] is set, is not Null, is not an array (presumably the basic problem) and has a value that evaluates to TRUE.

In fact, the value of $form['#tree'] in this particular error case (at least the first time through) appears to be "L".

Any help in understanding what's going on would be appreciated.

chx’s picture

Assigned: Unassigned » chx
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.05 KB

This can't be! I swear I fixed this before. I even blogged the way of how to find what to fix.

Thomas Sewell’s picture

Patch solves the problem for me.

I can edit forum topics now. Thanks!

dries’s picture

Status: Reviewed & tested by the community » Fixed

This has been committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)