Closed (cannot reproduce)
Project:
Corresponding node references
Version:
6.x-4.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2010 at 00:57 UTC
Updated:
30 Dec 2012 at 17:34 UTC
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
Comment #1
domidc commentedOk thanks for the info and fix. After refactoring the module I forgot to look at the screen when no referencable type where present.
Comment #2
domidc commentedComment #3
czigor commentedI could not really reproduce this error, as $data['referenceable_types'] is never empty. Could you provide details how you did it?
Comment #4
domidc commented