Been trying for the last hour to work this one out.
$query = new EntityFieldQuery();
$query -> entityCondition('entity_type', 'node')
-> entityCondition('bundle', 'subscription');
$results = $query->execute();
if(isset($results['node'])) {
$subscription_nids = array_keys($results['node']);
$nodes = node_load_multiple($subscription_nids, TRUE);
return $nodes;
} else {
return FALSE;
}
This is a very simple version of the entire query, but the error is exactly the same:
Warning: Invalid argument supplied for foreach() in DrupalDefaultEntityController->buildQuery() (line 290 of /var/www/ml/data/www/ml.mailapproved.com/includes/entity.inc).
I don't understand what's wrong here.