As reported by @gnuwings in #595276-62: Assign to fields for tasks and tickets:

I have installed the latest stable version of storm module, but when I create or edit task, the following warning occurs:

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/gnuwings/public_html/dev/qcsc/drupal/sites/dev.gnuwings.org/modules/storm/storm.module on line 943.

This warning occurs only if there are no teams configured in storm. I have tried to fix it in the source, but my inexperience in the code made it ugly and I'm not sure whether it's the ideal solution. Can somebody look into this?

I would like to appreciate @Magnity and @jurgenhaas for the addition of wonderful features in storm.

CommentFileSizeAuthor
#1 storm.module.patch643 bytesMagnity

Comments

Magnity’s picture

Status: Active » Needs review
StatusFileSize
new643 bytes

Does the attached patch fix this?

gnuwings’s picture

Thanks @Magnity for creating separate issue and for the quick patch. I will test it today and let you know.

matt v.’s picture

I was seeing the same error. I successfully applied the patch and initially received the following error:

Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in /home/minevan8/public_html/storm/sites/all/modules/storm/storm.module on line 943

I then edited line #943 to read as follows (adding a close parenthesis before the &&), which appears to have fixed the issue.

  if (isset($options[$teams]) && array_key_exists(0, $options[$teams])) {
Magnity’s picture

Status: Needs review » Fixed

Thanks, committed with that syntax correction.

tchurch’s picture

subscribing

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.