DrupalDefaultEntityController invalid argument supplied for foreach Been trying for the last hour to work this one out.

$query = new EntityFieldQuery();
$query -&gt; entityCondition('entity_type', 'node')
       -&gt; entityCondition('bundle', 'subscription');

$results = $query-&gt;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-&gt;buildQuery() (line 290 of /var/www/ml/data/www/ml.mailapproved.com/includes/entity.inc).


I don't understand what's wrong here.
The 2nd argument for node_load_multiple() is an array of conditions; currently you're providing a boolean so when the buildQuery function tries to iterate over the variable you get a warning.

The 3rd argument is to reset the cache (I guess that's what you're trying to do), so the call should be:

$nodes = node_load_multiple($subscription_nids, array(), TRUE);