Full Error:
warning: Invalid argument supplied for foreach() in .../wwwroot/sites/all/modules/cnr/corresponding_node_references.module on line 53.

The line:

foreach ($data['referenceable_types'] as $reference) {

I was able to temporarily fix this by wrapping the foreach loop in an if statement

if (is_array($data['referenceable_types'])) {
foreach ($data['referenceable_types'] as $reference) {
....
}
}

Cheers.

Comments

domidc’s picture

Ok thanks for the info and fix. After refactoring the module I forgot to look at the screen when no referencable type where present.

domidc’s picture

Category: bug » task
czigor’s picture

Status: Active » Postponed (maintainer needs more info)

I could not really reproduce this error, as $data['referenceable_types'] is never empty. Could you provide details how you did it?

domidc’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)