I installed JSTools, and then I installed Location Hierarchy module.

When I go to Administration > Site configuration and click on xHierarchy module settings, I get this error:

Fatal error: Cannot use string offset as an array in /home/myusername/public_html/sites/all/modules/jstools/jscalendar/jscalendar.module on line 47

I searched the bug tracker but couldn't find this error being reported. It's a show stopper. Can you recommend a resolution, please.

Thank you.

CommentFileSizeAuthor
#2 jscalendar_218019.patch988 bytesdeekayen

Comments

sentron’s picture

FYI, I use PHP5 and Apache 1.x. This seems like an issue while using JSTools with PHP5.

deekayen’s picture

Version: 5.x-0.8 » 5.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new988 bytes

I ran across this because I had created a form array incorrectly and element_children was messing up my form array as a result during form_builder() as it looped through what it thought was elements. In my module that was generating the form, I had written:

$form['example_id'] = 12000;

when what I really meant to write is

$form['example_id'] = array(
  '#type' => 'value',
  '#value' => 12000
);

Doing the former blew up lots of things, including uncovering this bug. While it wasn't jcalendar's fault, jcalendar could have handled it slightly better. See attached patch for my solution.

In short, Location Hierarchy probably has a malformed $form array somewhere you should also file a bug on.